added the 'delete' operator

This commit is contained in:
Jeremy Ashkenas
2009-12-17 21:21:07 -05:00
parent 0dc445138b
commit 9976de76f5
4 changed files with 12 additions and 4 deletions

View File

@@ -252,7 +252,8 @@ class OpNode < Node
end
def compile_unary(indent, scope)
"#{@operator}#{@first.compile(indent, scope)}"
space = @operator == 'delete' ? ' ' : ''
"#{@operator}#{space}#{@first.compile(indent, scope)}"
end
end