mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-05-03 03:00:14 -04:00
Fix #4451: Treat default as a keyword in an export statement only when it follows export or as
This commit is contained in:
@@ -127,7 +127,7 @@ exports.Lexer = class Lexer
|
||||
if id is 'as' and @seenExport and @tag() is 'IDENTIFIER'
|
||||
@token 'AS', id
|
||||
return id.length
|
||||
if id is 'default' and @seenExport
|
||||
if id is 'default' and @seenExport and @tag() in ['EXPORT', 'AS']
|
||||
@token 'DEFAULT', id
|
||||
return id.length
|
||||
|
||||
|
||||
Reference in New Issue
Block a user