File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -85,8 +85,11 @@ walk = (ast) ->
85
85
ast[2 ] = walk ast[2 ]
86
86
ast[3 ] = walk ast[3 ]
87
87
else if type is ' call'
88
- ast[1 ] = walk ast[1 ]
89
88
funcName = ast[1 ]
89
+ if ast[1 ][0 ] is ' dot'
90
+ ast[1 ][1 ] = walk ast[1 ][1 ]
91
+ else
92
+ ast[1 ] = walk ast[1 ]
90
93
params = ast[2 ]
91
94
for ast2, i in ast[2 ]
92
95
ast[2 ][i] = walk ast2
@@ -197,7 +200,20 @@ walk = (ast) ->
197
200
]
198
201
]
199
202
else if type is ' string'
200
- ast[1 ] = ast[1 ].replace (/ \<\/ / g ," <\\ /" )
203
+ a = ast[1 ].indexOf (" </" )
204
+ if a > - 1
205
+ ast = [
206
+ ' binary'
207
+ ' +'
208
+ [
209
+ ' string'
210
+ ast[1 ].substr (0 ,a+ 1 )
211
+ ]
212
+ walk [
213
+ ' string'
214
+ ast[1 ].substr (a+ 1 )
215
+ ]
216
+ ]
201
217
else
202
218
console .error " Unknown type: '#{ type} '"
203
219
console .log util .inspect ast, false , null , true
You can’t perform that action at this time.
0 commit comments