@@ -81,25 +81,25 @@ public enum ConditionalSyntax {
81
81
extension Syntax : BodiedSyntax {
82
82
internal func externals( ) -> Set < String > {
83
83
switch self {
84
- case . conditional( let bS as BodiedSyntax ) ,
85
- . custom( let bS as BodiedSyntax ) ,
86
- . export( let bS as BodiedSyntax ) ,
87
- . extend( let bS as BodiedSyntax ) ,
88
- . with( let bS as BodiedSyntax ) ,
89
- . loop( let bS as BodiedSyntax ) : return bS. externals ( )
84
+ case . conditional( let bS as any BodiedSyntax ) ,
85
+ . custom( let bS as any BodiedSyntax ) ,
86
+ . export( let bS as any BodiedSyntax ) ,
87
+ . extend( let bS as any BodiedSyntax ) ,
88
+ . with( let bS as any BodiedSyntax ) ,
89
+ . loop( let bS as any BodiedSyntax ) : return bS. externals ( )
90
90
default : return . init( )
91
91
}
92
92
}
93
93
94
94
internal func imports( ) -> Set < String > {
95
95
switch self {
96
96
case . import( let i) : return . init( arrayLiteral: i. key)
97
- case . conditional( let bS as BodiedSyntax ) ,
98
- . custom( let bS as BodiedSyntax ) ,
99
- . export( let bS as BodiedSyntax ) ,
100
- . extend( let bS as BodiedSyntax ) ,
101
- . expression( let bS as BodiedSyntax ) ,
102
- . loop( let bS as BodiedSyntax ) : return bS. imports ( )
97
+ case . conditional( let bS as any BodiedSyntax ) ,
98
+ . custom( let bS as any BodiedSyntax ) ,
99
+ . export( let bS as any BodiedSyntax ) ,
100
+ . extend( let bS as any BodiedSyntax ) ,
101
+ . expression( let bS as any BodiedSyntax ) ,
102
+ . loop( let bS as any BodiedSyntax ) : return bS. imports ( )
103
103
// .variable, .raw
104
104
default : return . init( )
105
105
}
@@ -122,12 +122,12 @@ extension Syntax: BodiedSyntax {
122
122
result. append ( self )
123
123
}
124
124
// Recursively inline single Syntaxes
125
- case . conditional( let bS as BodiedSyntax ) ,
126
- . custom( let bS as BodiedSyntax ) ,
127
- . export( let bS as BodiedSyntax ) ,
128
- . extend( let bS as BodiedSyntax ) ,
129
- . with( let bS as BodiedSyntax ) ,
130
- . loop( let bS as BodiedSyntax ) : result += bS. inlineRefs ( externals, imports)
125
+ case . conditional( let bS as any BodiedSyntax ) ,
126
+ . custom( let bS as any BodiedSyntax ) ,
127
+ . export( let bS as any BodiedSyntax ) ,
128
+ . extend( let bS as any BodiedSyntax ) ,
129
+ . with( let bS as any BodiedSyntax ) ,
130
+ . loop( let bS as any BodiedSyntax ) : result += bS. inlineRefs ( externals, imports)
131
131
case . expression( let pDA) : result. append ( . expression( pDA. inlineImports ( imports) ) )
132
132
// .variable, .raw
133
133
default : result. append ( self )
0 commit comments