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
modifiers:[TokenSyntax.public.withLeadingTrivia(.newlines(1)+.docLineComment("/// Namespace for commonly used tokens with default trivia.")+.newlines(1))],
24
+
leadingTrivia:.newlines(1)+.docLineComment("/// Namespace for commonly used tokens with default trivia.")+.newlines(1),
25
+
modifiers:[TokenSyntax.public],
22
26
extendedType:"TokenSyntax"
23
27
){
24
28
fortokenin SYNTAX_TOKENS {
25
29
if token.isKeyword {
26
30
VariableDecl(
27
-
modifiers:[token.text.map{TokenSyntax.static.withLeadingTrivia(.newlines(1)+.docLineComment("/// The `\($0)` keyword")+.newlines(1))}??TokenSyntax.static],
31
+
leadingTrivia: token.text.map{.newlines(1)+.docLineComment("/// The `\($0)` keyword")+.newlines(1)}??[],
32
+
modifiers:[TokenSyntax.static],
28
33
letOrVarKeyword:.var
29
34
){
30
35
// We need to use `CodeBlock` here to ensure there is braces around.
@@ -37,7 +42,8 @@ let tokensFile = SourceFile {
37
42
}
38
43
}elseiflet text = token.text {
39
44
VariableDecl(
40
-
modifiers:[TokenSyntax.static.withLeadingTrivia(.newlines(1)+.docLineComment("/// The `\(text)` token")+.newlines(1))],
45
+
leadingTrivia:.newlines(1)+.docLineComment("/// The `\(text)` token")+.newlines(1),
46
+
modifiers:[TokenSyntax.static],
41
47
letOrVarKeyword:.var
42
48
){
43
49
// We need to use `CodeBlock` here to ensure there is braces around.
@@ -74,7 +80,8 @@ let tokensFile = SourceFile {
74
80
}
75
81
}
76
82
VariableDecl(
77
-
modifiers:[TokenSyntax.static.withLeadingTrivia(.newlines(1)+.docLineComment("/// The `eof` token")+.newlines(1))],
83
+
leadingTrivia:.newlines(1)+.docLineComment("/// The `eof` token")+.newlines(1),
84
+
modifiers:[TokenSyntax.static],
78
85
letOrVarKeyword:.var
79
86
){
80
87
// We need to use `CodeBlock` here to ensure there is braces around.
0 commit comments