File tree Expand file tree Collapse file tree 2 files changed +127
-127
lines changed
Sources/SwiftSyntaxBuilder Expand file tree Collapse file tree 2 files changed +127
-127
lines changed Original file line number Diff line number Diff line change 21
21
import SwiftSyntax
22
22
23
23
/// Namespace for commonly used tokens with default trivia.
24
- enum Tokens {
24
+ public enum Tokens {
25
25
% for token in SYNTAX_TOKENS:
26
26
% if token. is_keyword:
27
27
/// The `${token.text.encode('utf-8').decode('unicode_escape')}` keyword
28
- static let `${lowercase_first_word(token.name)}` = SyntaxFactory . make${ token. name} Keyword( )
28
+ public static let `${lowercase_first_word(token.name)}` = SyntaxFactory . make${ token. name} Keyword( )
29
29
% if token. requires_leading_space:
30
30
. withLeadingTrivia ( . spaces( 1 ) )
31
31
% end
@@ -34,15 +34,15 @@ enum Tokens {
34
34
% end
35
35
% elif token. text:
36
36
/// The `${token.text.encode('utf-8').decode('unicode_escape')}` token
37
- static let `${lowercase_first_word(token.name)}` = SyntaxFactory . make ${ token. name} Token( )
37
+ public static let `${lowercase_first_word(token.name)}` = SyntaxFactory . make ${ token. name} Token( )
38
38
% if token. requires_leading_space:
39
39
. withLeadingTrivia ( . spaces( 1 ) )
40
40
% end
41
41
% if token. requires_trailing_space:
42
42
. withTrailingTrivia ( . spaces( 1 ) )
43
43
% end
44
44
% else:
45
- static func `${lowercase_first_word(token.name)}`( _ text: String) - > TokenSyntax {
45
+ public static func `${lowercase_first_word(token.name)}`( _ text: String) - > TokenSyntax {
46
46
SyntaxFactory . make ${ token. name} ( text)
47
47
% if token. requires_leading_space:
48
48
. withLeadingTrivia ( . spaces( 1 ) )
You can’t perform that action at this time.
0 commit comments