Implemented rescoping with the do keyword.

This commit is contained in:
Timothy Jones
2010-10-25 00:02:39 +13:00
parent f52ef98cee
commit d096f69c78
7 changed files with 207 additions and 183 deletions

View File

@@ -103,6 +103,7 @@ grammar =
o "Class"
o "Existence"
o "Comment"
o "Do"
]
# An indented block of expressions. Note that the [Rewriter](rewriter.html)
@@ -169,6 +170,10 @@ grammar =
Existence: [
o "Expression ?", -> new Existence $1
]
Do: [
o "DO Code", -> new Call $2, $2.params
]
# The **Code** node is the function literal. It's defined by an indented block
# of **Expressions** preceded by a function arrow, with an optional parameter