Skip to content

Commit

Permalink
Fix: when reserved words are used as identifier, js2-mode's parser wi…
Browse files Browse the repository at this point in the history
…ll corrupt.
  • Loading branch information
mooz committed Apr 2, 2010
1 parent d088d34 commit 9abd441
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js2-mode.el
Expand Up @@ -5608,7 +5608,7 @@ corresponding number. Otherwise return -1."
(memq result '(js2-LET js2-YIELD)))
;; LET and YIELD are tokens only in 1.7 and later
(setq result 'js2-NAME))
(if (not (eq result js2-RESERVED))
(if (not (eq result 'js2-RESERVED))
(throw 'return (js2-token-code result)))
(js2-report-warning "msg.reserved.keyword" str)))
;; If we want to intern these as Rhino does, just use (intern str)
Expand Down

0 comments on commit 9abd441

Please sign in to comment.