File tree Expand file tree Collapse file tree 5 files changed +93
-0
lines changed
Sources/SwiftSyntaxBuilderGeneration Expand file tree Collapse file tree 5 files changed +93
-0
lines changed Original file line number Diff line number Diff line change @@ -107,6 +107,7 @@ let package = Package(
107
107
" Classification.swift.gyb " ,
108
108
" CommonNodes.swift.gyb " ,
109
109
" DeclNodes.swift.gyb " ,
110
+ " ExpressibleAsConformances.swift.gyb " ,
110
111
" ExprNodes.swift.gyb " ,
111
112
" GenericNodes.swift.gyb " ,
112
113
" Kinds.swift.gyb " ,
Original file line number Diff line number Diff line change
1
+ % {
2
+ from gyb_syntax_support import *
3
+ from gyb_helpers import SYNTAX_BUILDABLE_EXPRESSIBLE_AS_CONFORMANCES
4
+ # -*- mode: Swift -*-
5
+ # Ignore the following admonition; it applies to the resulting . swift file only
6
+ } %
7
+ //// Automatically Generated From ExpressibleAsConformances.swift.gyb.
8
+ //// Do Not Edit Directly!
9
+ //===----------------------------------------------------------------------===//
10
+ //
11
+ // This source file is part of the Swift.org open source project
12
+ //
13
+ // Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
14
+ // Licensed under Apache License v2.0 with Runtime Library Exception
15
+ //
16
+ // See https://swift.org/LICENSE.txt for license information
17
+ // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
18
+ //
19
+ //===----------------------------------------------------------------------===//
20
+
21
+ let SYNTAX_BUILDABLE_EXPRESSIBLE_AS_CONFORMANCES : [ String : [ String ] ] = [
22
+ % for buildable, conformances in SYNTAX_BUILDABLE_EXPRESSIBLE_AS_CONFORMANCES. items ( ) :
23
+ " ${buildable} " : [
24
+ % for conformance in conformances:
25
+ " ${conformance} " ,
26
+ % end
27
+ ] ,
28
+ % end
29
+ ]
Original file line number Diff line number Diff line change
1
+ //// Automatically Generated From ExpressibleAsConformances.swift.gyb.
2
+ //// Do Not Edit Directly!
3
+ //===----------------------------------------------------------------------===//
4
+ //
5
+ // This source file is part of the Swift.org open source project
6
+ //
7
+ // Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
8
+ // Licensed under Apache License v2.0 with Runtime Library Exception
9
+ //
10
+ // See https://swift.org/LICENSE.txt for license information
11
+ // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
12
+ //
13
+ //===----------------------------------------------------------------------===//
14
+
15
+ let SYNTAX_BUILDABLE_EXPRESSIBLE_AS_CONFORMANCES : [ String : [ String ] ] = [
16
+ " AccessorList " : [
17
+ " AccessorBlock " ,
18
+ ] ,
19
+ " ArrayType " : [
20
+ " TypeAnnotation " ,
21
+ ] ,
22
+ " CodeBlockItemList " : [
23
+ " CodeBlock " ,
24
+ ] ,
25
+ " DeclBuildable " : [
26
+ " CodeBlockItem " ,
27
+ " MemberDeclListItem " ,
28
+ ] ,
29
+ " DictionaryType " : [
30
+ " TypeAnnotation " ,
31
+ ] ,
32
+ " ExprList " : [
33
+ " ConditionElement " ,
34
+ ] ,
35
+ " FunctionCallExpr " : [
36
+ " CodeBlockItem " ,
37
+ ] ,
38
+ " MemberDeclList " : [
39
+ " MemberDeclBlock " ,
40
+ ] ,
41
+ " SequenceExpr " : [
42
+ " CodeBlockItem " ,
43
+ " TupleExprElement " ,
44
+ ] ,
45
+ " SimpleTypeIdentifier " : [
46
+ " TypeAnnotation " ,
47
+ " TypeExpr " ,
48
+ ] ,
49
+ " StmtBuildable " : [
50
+ " CodeBlockItem " ,
51
+ ] ,
52
+ " TokenSyntax " : [
53
+ " BinaryOperatorExpr " ,
54
+ " DeclModifier " ,
55
+ " IdentifierExpr " ,
56
+ ] ,
57
+ " TypeBuildable " : [
58
+ " ReturnClause " ,
59
+ " TypeInitializerClause " ,
60
+ ] ,
61
+ ]
Original file line number Diff line number Diff line change
1
+ ../ ../ SwiftSyntaxBuilder / gyb_helpers / ExpressibleAsConformances .py
Original file line number Diff line number Diff line change 1
1
from .utils import make_swift_child , make_swift_node
2
+ from .ExpressibleAsConformances import SYNTAX_BUILDABLE_EXPRESSIBLE_AS_CONFORMANCES
You can’t perform that action at this time.
0 commit comments