Skip to content

Commit 141ec77

Browse files
committed
Remove import, export and default from reserved list
1 parent c2b55da commit 141ec77

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/lexer.coffee

+3-2
Original file line numberDiff line numberDiff line change
@@ -774,6 +774,7 @@ JS_KEYWORDS = [
774774
'return', 'throw', 'break', 'continue', 'debugger', 'yield'
775775
'if', 'else', 'switch', 'for', 'while', 'do', 'try', 'catch', 'finally'
776776
'class', 'extends', 'super'
777+
'export', 'import', 'default'
777778
]
778779

779780
# CoffeeScript-only keywords.
@@ -800,8 +801,8 @@ COFFEE_KEYWORDS = COFFEE_KEYWORDS.concat COFFEE_ALIASES
800801
# used by CoffeeScript internally. We throw an error when these are encountered,
801802
# to avoid having a JavaScript error at runtime.
802803
RESERVED = [
803-
'case', 'default', 'function', 'var', 'void', 'with', 'const', 'let', 'enum'
804-
'export', 'import', 'native', 'implements', 'interface', 'package', 'private'
804+
'case', 'function', 'var', 'void', 'with', 'const', 'let', 'enum'
805+
'native', 'implements', 'interface', 'package', 'private'
805806
'protected', 'public', 'static'
806807
]
807808

0 commit comments

Comments
 (0)