@@ -93,10 +93,10 @@ public struct Regex<Output>: RegexComponent {
9393 let program : Program
9494
9595 var hasCapture : Bool {
96- program. tree . hasCapture
96+ program. list . hasCapture
9797 }
9898 var hasChildren : Bool {
99- program. tree . hasChildren
99+ program. list . hasChildren
100100 }
101101
102102 init ( ast: AST ) {
@@ -153,7 +153,7 @@ extension Regex {
153153 /// FIXME: If Regex is the unit of composition, then it should be a Node instead,
154154 /// and we should have a separate type that handled both global options and,
155155 /// likely, compilation/caching.
156- var tree : DSLList
156+ var list : DSLList
157157
158158 /// OptionSet of compiler options for testing purposes
159159 fileprivate var compileOptions : _CompileOptions = . default
@@ -183,7 +183,7 @@ extension Regex {
183183 }
184184
185185 // Compile the DSLTree into a lowered program and store it atomically.
186- let compiledProgram = try ! Compiler ( tree: tree , compileOptions: compileOptions) . emit ( )
186+ let compiledProgram = try ! Compiler ( tree: list , compileOptions: compileOptions) . emit ( )
187187 let storedNewProgram = _stdlib_atomicInitializeARCRef (
188188 object: _loweredProgramStoragePtr,
189189 desired: ProgramBox ( compiledProgram) )
@@ -196,15 +196,15 @@ extension Regex {
196196 }
197197
198198 init ( ast: AST ) {
199- self . tree = DSLList ( ast: ast)
199+ self . list = DSLList ( ast: ast)
200200 }
201201
202202 init ( tree: DSLTree ) {
203- self . tree = DSLList ( tree: tree)
203+ self . list = DSLList ( tree: tree)
204204 }
205205
206206 init ( list: DSLList ) {
207- self . tree = list
207+ self . list = list
208208 }
209209 }
210210
@@ -228,7 +228,7 @@ extension Regex {
228228// }
229229
230230 var list : DSLList {
231- program. tree
231+ program. list
232232 }
233233
234234 init ( node: DSLTree . Node ) {
@@ -240,19 +240,19 @@ extension Regex {
240240 }
241241
242242 func appending< T> ( _ node: DSLTree . Node ) -> Regex < T > {
243- var list = program. tree
243+ var list = program. list
244244 list. append ( node)
245245 return Regex < T > ( list: list)
246246 }
247247
248248 func appending< T> ( contentsOf node: some Collection < DSLTree . Node > ) -> Regex < T > {
249- var list = program. tree
249+ var list = program. list
250250 list. append ( contentsOf: node)
251251 return Regex < T > ( list: list)
252252 }
253253
254254 func concatenating< T> ( _ other: some Collection < DSLTree . Node > ) -> Regex < T > {
255- var nodes = program. tree . nodes
255+ var nodes = program. list . nodes
256256 switch nodes [ 0 ] {
257257 case . concatenation( let children) :
258258 nodes [ 0 ] = . concatenation( Array ( repeating: TEMP_FAKE_NODE, count: children. count + 1 ) )
@@ -265,7 +265,7 @@ extension Regex {
265265 }
266266
267267 func alternating< T> ( with other: some Collection < DSLTree . Node > ) -> Regex < T > {
268- var nodes = program. tree . nodes
268+ var nodes = program. list . nodes
269269 switch nodes [ 0 ] {
270270 case . orderedChoice( let children) :
271271 nodes [ 0 ] = . orderedChoice( Array ( repeating: TEMP_FAKE_NODE, count: children. count + 1 ) )
@@ -278,13 +278,13 @@ extension Regex {
278278 }
279279
280280 func prepending< T> ( _ node: DSLTree . Node ) -> Regex < T > {
281- var list = program. tree
281+ var list = program. list
282282 list. prepend ( node)
283283 return Regex < T > ( list: list)
284284 }
285285
286286 func prepending< T> ( contentsOf node: some Collection < DSLTree . Node > ) -> Regex < T > {
287- var list = program. tree
287+ var list = program. list
288288 list. prepend ( contentsOf: node)
289289 return Regex < T > ( list: list)
290290 }
@@ -309,7 +309,7 @@ extension Regex {
309309 return true
310310 case . recompile:
311311 let _ = try Compiler (
312- tree: program. tree ,
312+ tree: program. list ,
313313 compileOptions: program. compileOptions) . emit ( )
314314 return true
315315 }
0 commit comments