You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
maybe the whole concept of a diagnostic engine/consumers shouldn't live in SwiftSyntax/SwiftSyntaxParser at all? If the parser is the only user of it, it could just take a callback function instead of a diagnostic engine reference, and pass its own lightweight Diagnostic value containing information relevant to a parse issue. Then, clients of SwiftSyntaxParser would translate those into whatever diagnostic engine they wanted to use (for example, swift-format could start using TSC instead).
The text was updated successfully, but these errors were encountered:
Right, AFAICT all SwiftSyntaxParser needs to be able to do is communicate the location, severity, and description of the diagnostics back to the caller; it doesn't need to worry about providing capabilities like JSON serialization or even printing them. So the reporting can be done with a lightweight Diagnostic value that's specific to SwiftSyntaxParser, and modifying the parser APIs to take a diagnostic callback function instead of the engine. Then, the user would forward those to a specific diagnostic engine implementation or something else entirely.
Additional Detail from JIRA
md5: 5671cec3472131d2317036b28cf2d9f7
Issue Description:
As discussed here (apple/swift-format#268 (comment)
The text was updated successfully, but these errors were encountered: