Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove where from reserved keywords #1033

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/lexer.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/lexer.ls
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ exports <<<
@fset 'for' false
@fset 'by' false
@unline! if tag in <[ RELATION THEN ELSE CASE DEFAULT CATCH FINALLY
IN OF FROM TO BY EXTENDS IMPLEMENTS WHERE ]>
IN OF FROM TO BY EXTENDS IMPLEMENTS ]>
@token tag, id
input.length

Expand Down Expand Up @@ -1131,7 +1131,7 @@ character = if not JSON? then uxxxx else ->
tag is '[' and brackets.push prev.0 is 'DOT'
if prev.0 is ']'
if brackets.pop! then prev.index = true else continue
continue unless prev.0 in <[ FUNCTION GENERATOR LET WHERE ]>
continue unless prev.0 in <[ FUNCTION GENERATOR LET ]>
or prev.spaced and able tokens, i, true
if token.doblock
token.0 = 'CALL('
Expand Down Expand Up @@ -1341,7 +1341,7 @@ KEYWORDS_UNUSED =

JS_KEYWORDS = KEYWORDS_SHARED ++ KEYWORDS_UNUSED

LS_KEYWORDS = <[ xor match where ]>
LS_KEYWORDS = <[ xor match ]>

##### Regexes
# Some of these are given `g` flag and made sure to match empty string
Expand Down
5 changes: 5 additions & 0 deletions test/declaration.ls
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,8 @@ eq '''(function(n){

eq '''var ref$;
1 < 2 && 2 === (ref$ = 4 / 2) && ref$ > 0;''' LiveScript.compile '1 < 2 == 4/2 > 0' {+\const, +bare,-header}


### former reserved words
where = 1
eq 1 where