adding 'unless' blocks

This commit is contained in:
Jeremy Ashkenas
2010-04-27 19:35:15 -04:00
parent 92af641827
commit b746c9018e
4 changed files with 77 additions and 59 deletions

View File

@@ -488,6 +488,7 @@ grammar: {
# ambiguity.
IfStart: [
o "IF Expression Block", -> new IfNode $2, $3
o "UNLESS Expression Block", -> new IfNode $2, $3, null, {invert: true}
o "IfStart ElsIf", -> $1.add_else $2
]