documentation waypoint

This commit is contained in:
Jeremy Ashkenas
2009-12-21 11:41:45 -05:00
parent dcc70e5ab0
commit c7fa9c320a
42 changed files with 1026 additions and 53 deletions

View File

@@ -10,7 +10,7 @@ token TRY CATCH FINALLY THROW
token BREAK CONTINUE
token FOR IN WHILE
token SWITCH CASE
token SUPER
token EXTENDS SUPER
token DELETE
token NEWLINE
token JS
@@ -28,8 +28,8 @@ prechigh
right '-=' '+=' '/=' '*=' '||=' '&&='
right DELETE
left "."
right THROW FOR IN WHILE
left UNLESS IF ELSE
right THROW FOR IN WHILE NEW
left UNLESS IF ELSE EXTENDS
left ":"
right RETURN
preclow
@@ -68,6 +68,7 @@ rule
| Call
| Code
| Operation
| Extend
;
# We have to take extra care to convert these statements into expressions.
@@ -246,6 +247,11 @@ rule
SUPER "(" ArgList ")" { result = CallNode.new(:super, val[2]) }
;
# Extending a class.
Extend:
IDENTIFIER EXTENDS Expression { result = ExtendNode.new(val[0], val[2]) }
;
# The array literal.
Array:
"[" ArgList "]" { result = ArrayNode.new(val[1]) }