File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Sources/SwiftSyntaxBuilderGeneration Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -14,4 +14,5 @@ import Foundation
14
14
15
15
extension StringProtocol {
16
16
var withFirstCharacterLowercased : String { prefix ( 1 ) . lowercased ( ) + dropFirst( ) }
17
+ var backticked : String { " ` \( self ) ` " }
17
18
}
Original file line number Diff line number Diff line change @@ -35,10 +35,10 @@ let tokensFile = SourceFile {
35
35
// We need to use `CodeBlock` here to ensure there is braces around.
36
36
37
37
let accessor = CodeBlock {
38
- FunctionCallExpr ( MemberAccessExpr ( base: " TokenSyntax " , name: " \( token. swiftKind) " ) )
38
+ FunctionCallExpr ( MemberAccessExpr ( base: " TokenSyntax " , name: token. swiftKind) )
39
39
}
40
40
41
- createTokenSyntaxPatternBinding ( " ` \( token. name. withFirstCharacterLowercased) ` " , accessor: accessor)
41
+ createTokenSyntaxPatternBinding ( token. name. withFirstCharacterLowercased. backticked , accessor: accessor)
42
42
}
43
43
} else if let text = token. text {
44
44
VariableDecl (
@@ -51,7 +51,7 @@ let tokensFile = SourceFile {
51
51
FunctionCallExpr ( MemberAccessExpr ( base: " TokenSyntax " , name: " \( token. swiftKind) Token " ) )
52
52
}
53
53
54
- createTokenSyntaxPatternBinding ( " ` \( token. name. withFirstCharacterLowercased) ` " , accessor: accessor)
54
+ createTokenSyntaxPatternBinding ( token. name. withFirstCharacterLowercased. backticked , accessor: accessor)
55
55
}
56
56
}
57
57
// TokenSyntax with custom text already has a static constructor function defined in SwiftSyntax.
You can’t perform that action at this time.
0 commit comments