Skip to content

Commit

Permalink
remove async ->
Browse files Browse the repository at this point in the history
  • Loading branch information
summivox committed Mar 30, 2017
1 parent c60abe6 commit 4b9323f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions src/grammar.ls
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,6 @@ bnf =
# The function literal can be either anonymous with `->`,
o 'PARAM( ArgList OptComma )PARAM -> Block'
, -> Fun $2, $6, /~/.test($5), /--|~~/.test($5), /!/.test($5), /\*/.test($5), />>/.test($5)
o 'ASYNC PARAM( ArgList OptComma )PARAM -> Block'
, -> Fun $3, $7, /~/.test($6), /--|~~/.test($6), /!/.test($6), false, true
# or named with `function`.
o 'FUNCTION CALL( ArgList OptComma )CALL Block' -> (Fun $3, $6).named $1
o 'GENERATOR CALL( ArgList OptComma )CALL Block'
Expand Down
2 changes: 1 addition & 1 deletion src/lexer.ls
Original file line number Diff line number Diff line change
Expand Up @@ -1036,7 +1036,7 @@ character = if not JSON? then uxxxx else ->
case tag is 'ID' and val is 'async'
next = tokens[i + 1]
switch next.0
| 'PARAM(', 'FUNCTION' => token.0 = 'ASYNC'
| 'FUNCTION' => token.0 = 'ASYNC'
| 'GENERATOR' => carp 'named generator cannot be async' line
prev = token
continue
Expand Down

0 comments on commit 4b9323f

Please sign in to comment.