File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Sources/SwiftParser/Diagnostics Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -16,12 +16,12 @@ import SwiftSyntax
16
16
let diagnosticDomain : String = " SwiftParser "
17
17
18
18
extension SyntaxProtocol {
19
- /// Return a name of this syntax node that can be used to describe it in
20
- /// diagnostics.
21
- /// Nodes that mostly exist for the syntax tree's structure and don't have a
22
- /// correspondence in the source code that's meeingful to the user by default
23
- /// use the name of the parent node that encloses it. Pass `false` to `inherit`
24
- /// to prevent this name inheritance .
19
+ /// Return the name of this syntax node to be used to describe it in
20
+ /// diagnostics. If the node itself has no diagnostic name (eg. it exists for
21
+ /// the syntax tree's structure), use the name of the enclosing parent node by
22
+ /// default.
23
+ /// Pass inherit: false to prevent this behavior, in which case `nil` will be
24
+ /// returned instead .
25
25
func nodeTypeNameForDiagnostics( inherit: Bool = true ) -> String ? {
26
26
if let name = Syntax ( self ) . as ( SyntaxEnum . self) . nameForDiagnostics {
27
27
return name
You can’t perform that action at this time.
0 commit comments