@@ -141,8 +141,8 @@ mayHaveSideEffects =
141
141
], (inScope ) ->
142
142
any @childNodes , (child ) =>
143
143
if child in @listMembers
144
- then any @ [child], (m ) -> mayHaveSideEffects m, inScope
145
- else mayHaveSideEffects @ [child], inScope
144
+ then any this [child], (m ) -> mayHaveSideEffects m, inScope
145
+ else mayHaveSideEffects this [child], inScope
146
146
147
147
148
148
@@ -355,19 +355,19 @@ class exports.Optimiser
355
355
356
356
walk = (fn , inScope = [], ancestry = []) ->
357
357
ancestry .unshift this
358
- for childName in @childNodes when @ [childName]?
358
+ for childName in @childNodes when this [childName]?
359
359
if childName in @listMembers
360
- for member, n in @ [childName]
361
- while @ [childName][n] isnt walk .call (@ [childName][n] = fn .call @ [childName][n], {inScope, ancestry}), fn, inScope, ancestry then
362
- inScope = union inScope, envEnrichments @ [childName][n], inScope
360
+ for member, n in this [childName]
361
+ while this [childName][n] isnt walk .call (this [childName][n] = fn .call this [childName][n], {inScope, ancestry}), fn, inScope, ancestry then
362
+ inScope = union inScope, envEnrichments this [childName][n], inScope
363
363
else
364
- while @ [childName] isnt walk .call (@ [childName] = fn .call @ [childName], {inScope, ancestry}), fn, inScope, ancestry then
365
- inScope = union inScope, envEnrichments @ [childName], inScope
364
+ while this [childName] isnt walk .call (this [childName] = fn .call this [childName], {inScope, ancestry}), fn, inScope, ancestry then
365
+ inScope = union inScope, envEnrichments this [childName], inScope
366
366
do ancestry .shift
367
367
replacementNode = fn .call this , {inScope, ancestry}
368
368
if this isnt replacementNode
369
369
while replacementNode isnt walk .call (replacementNode = fn .call replacementNode, {inScope, ancestry}), fn, inScope, ancestry then
370
- replacementNode[p] = @ [p] for p in [' raw' , ' line' , ' column' , ' offset' ]
370
+ replacementNode[p] = this [p] for p in [' raw' , ' line' , ' column' , ' offset' ]
371
371
replacementNode
372
372
373
373
(ast ) ->
0 commit comments