Permalink
Browse files

Inline awaits now work

  • Loading branch information...
1 parent 628bebd commit 6f69b862e278d1a0dfeca12160a131c721367aa4 @maxtaco committed Nov 24, 2011
Showing with 233 additions and 158 deletions.
  1. +3 −3 lib/coffee-script/grammar.js
  2. +227 −153 lib/coffee-script/parser.js
  3. +3 −2 src/grammar.coffee

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -83,7 +83,8 @@ grammar =
]
Await: [
- o 'AWAIT Block', -> new Await $2
+ o 'AWAIT Block', -> new Await $2
+ o 'AWAIT Expression', -> new Await Block.wrap [$2 ]
]
# All the different types of expressions in our language. The basic unit of
@@ -574,7 +575,7 @@ operators = [
['nonassoc', 'INDENT', 'OUTDENT']
['right', '=', ':', 'COMPOUND_ASSIGN', 'RETURN', 'THROW', 'EXTENDS']
['right', 'FORIN', 'FOROF', 'BY', 'WHEN']
- ['right', 'IF', 'ELSE', 'FOR', 'WHILE', 'UNTIL', 'LOOP', 'SUPER', 'CLASS']
+ ['right', 'IF', 'ELSE', 'FOR', 'WHILE', 'UNTIL', 'LOOP', 'SUPER', 'CLASS', 'AWAIT' ]
['right', 'POST_IF']
]

0 comments on commit 6f69b86

Please sign in to comment.