Skip to content

Commit 6ec1b03

Browse files
committed
Walk conditionals, fix void(0)'s.
1 parent 34668a9 commit 6ec1b03

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/pimscript.coffee

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,15 @@ walk = (ast) ->
9191
#skip
9292
else if type is 'regexp'
9393
#skip
94-
else if type is 'unary-prefix'
94+
else if type is 'conditional'
95+
ast[1] = walk ast[1]
9596
ast[2] = walk ast[2]
97+
ast[3] = walk ast[3]
98+
else if type is 'unary-prefix'
99+
if ast[1] is 'void'
100+
ast = ['name','null']
101+
else
102+
ast[2] = walk ast[2]
96103
else if type is 'name'
97104
#skip
98105
else if type is 'sub'

0 commit comments

Comments
 (0)