Skip to content

Commit e346136

Browse files
committed
Take into account ECMAScript 3 and 6 reserved keywords
1 parent f875fe9 commit e346136

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

compiler/reserved.ml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ let keyword = List.fold_left (fun acc x -> StringSet.add x acc)
3535
"this"; "throw"; "try"; "typeof";
3636
"var"; "void"; "while"; "with";
3737

38-
(* reserved for future use *)
38+
(* reserved in ECMAScript 5 *)
3939
"class"; "enum"; "export"; "extends"; "import"; "super";
4040

4141
"implements";"interface";
@@ -54,6 +54,13 @@ let keyword = List.fold_left (fun acc x -> StringSet.add x acc)
5454
"undefined";
5555
"this";
5656

57+
(* also reserved in ECMAScript 3 *)
58+
"abstract"; "boolean"; "byte"; "char"; "const"; "double";
59+
"final"; "float"; "goto"; "int"; "long"; "native"; "short";
60+
"synchronized"; "throws"; "transient"; "volatile";
61+
62+
(* also reserved in ECMAScript 6 *)
63+
"await"
5764
]
5865

5966

0 commit comments

Comments
 (0)