Skip to content

Commit

Permalink
Merge branch 'bugfix-1436' of git://github.com/thejh/coffee-script in…
Browse files Browse the repository at this point in the history
…to thejh_1448
  • Loading branch information
michaelficarra committed Jun 30, 2011
2 parents c93fc3e + 9699059 commit f6fcfa8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/lexer.js

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

3 changes: 1 addition & 2 deletions src/lexer.coffee
Expand Up @@ -84,8 +84,7 @@ exports.Lexer = class Lexer
not prev.spaced and prev[0] is '@')
tag = 'IDENTIFIER'

if id in JS_KEYWORDS or
not forcedIdentifier and id in COFFEE_KEYWORDS
if not forcedIdentifier and (id in JS_KEYWORDS or id in COFFEE_KEYWORDS)
tag = id.toUpperCase()
if tag is 'WHEN' and @tag() in LINE_BREAK
tag = 'LEADING_WHEN'
Expand Down
3 changes: 3 additions & 0 deletions test/objects.coffee
Expand Up @@ -215,3 +215,6 @@ test "#1274: `{} = a()` compiles to `false` instead of `a()`", ->
fn = -> a = true
{} = fn()
ok a

test "#1436: `for` etc. work as normal property names", ->
doesNotThrow -> CoffeeScript.compile "foo.for = 'bar' of foo"

0 comments on commit f6fcfa8

Please sign in to comment.