File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Sources/SwiftSyntaxBuilder Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -48,10 +48,14 @@ extension SyntaxParseable {
48
48
{
49
49
let diagnostics = ParseDiagnosticsGenerator . diagnostics ( for: self )
50
50
let formattedDiagnostics = DiagnosticsFormatter ( ) . annotatedSource ( tree: self , diags: diagnostics)
51
- Logger ( subsystem: " SwiftSyntax " , category: " ParseError " ) . fault (
51
+ Logger ( subsystem: " org.swift.swift-syntax " , category: " ParseError " ) . fault (
52
52
"""
53
53
Parsing a ` \( Self . self) ` node from string interpolation produced the following parsing errors.
54
54
Set a breakpoint in `SyntaxParseable.logStringInterpolationParsingError()` to debug the failure.
55
+
56
+ To explicitly support parsing of invalid source code, import SwiftParser and invoke the parser as follows
57
+ var parser = Parser(source)
58
+ \( Self . self) .parse(from: &parser)
55
59
\( formattedDiagnostics, privacy: . private)
56
60
"""
57
61
)
@@ -61,7 +65,7 @@ extension SyntaxParseable {
61
65
62
66
/// Initialize the syntax node from a string interpolation.
63
67
///
64
- /// - Important: This asssumes that the string interpolation produces a valid
68
+ /// - Important: This assumes that the string interpolation produces a valid
65
69
/// syntax tree. If the syntax tree is not valid, a fault will
66
70
/// be logged using OSLog on Darwin platforms.
67
71
public init ( stringInterpolation: SyntaxStringInterpolation ) {
You can’t perform that action at this time.
0 commit comments