adding until loops as the inverse of while loops

This commit is contained in:
Jeremy Ashkenas
2010-04-28 22:08:00 -04:00
parent 17ba44056e
commit adbcd320b2
10 changed files with 133 additions and 101 deletions

View File

@@ -855,6 +855,7 @@ exports.SplatNode: class SplatNode extends BaseNode
exports.WhileNode: class WhileNode extends BaseNode
constructor: (condition, opts) ->
condition: new OpNode('!', condition) if opts and opts.invert
@children:[@condition: condition]
@guard: opts and opts.guard