mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-17 19:11:22 -05:00
Implemented rescoping with the do keyword.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user