]> git.kaiwu.me - njs.git/commitdiff
Updated list of reserved keywords.
authorDmitry Volyntsev <xeioex@nginx.com>
Fri, 8 Feb 2019 17:06:05 +0000 (20:06 +0300)
committerDmitry Volyntsev <xeioex@nginx.com>
Fri, 8 Feb 2019 17:06:05 +0000 (20:06 +0300)
njs/njs_lexer_keyword.c
njs/test/njs_expect_test.exp

index bdffdf0857214e79b7205806da84d3364bd3a32c..0b52156331ab9c02174262b6afb6bb8bb02bdf69 100644 (file)
@@ -95,37 +95,23 @@ static const njs_keyword_t  njs_keywords[] = {
 
     /* Reserved words. */
 
-    { nxt_string("abstract"),      NJS_TOKEN_RESERVED, 0 },
-    { nxt_string("boolean"),       NJS_TOKEN_RESERVED, 0 },
-    { nxt_string("byte"),          NJS_TOKEN_RESERVED, 0 },
-    { nxt_string("char"),          NJS_TOKEN_RESERVED, 0 },
+    { nxt_string("await"),         NJS_TOKEN_RESERVED, 0 },
     { nxt_string("class"),         NJS_TOKEN_RESERVED, 0 },
     { nxt_string("const"),         NJS_TOKEN_RESERVED, 0 },
     { nxt_string("debugger"),      NJS_TOKEN_RESERVED, 0 },
-    { nxt_string("double"),        NJS_TOKEN_RESERVED, 0 },
     { nxt_string("enum"),          NJS_TOKEN_RESERVED, 0 },
     { nxt_string("export"),        NJS_TOKEN_RESERVED, 0 },
     { nxt_string("extends"),       NJS_TOKEN_RESERVED, 0 },
-    { nxt_string("final"),         NJS_TOKEN_RESERVED, 0 },
-    { nxt_string("float"),         NJS_TOKEN_RESERVED, 0 },
-    { nxt_string("goto"),          NJS_TOKEN_RESERVED, 0 },
     { nxt_string("implements"),    NJS_TOKEN_RESERVED, 0 },
     { nxt_string("import"),        NJS_TOKEN_RESERVED, 0 },
-    { nxt_string("int"),           NJS_TOKEN_RESERVED, 0 },
     { nxt_string("interface"),     NJS_TOKEN_RESERVED, 0 },
-    { nxt_string("long"),          NJS_TOKEN_RESERVED, 0 },
-    { nxt_string("native"),        NJS_TOKEN_RESERVED, 0 },
+    { nxt_string("let"),           NJS_TOKEN_RESERVED, 0 },
     { nxt_string("package"),       NJS_TOKEN_RESERVED, 0 },
     { nxt_string("private"),       NJS_TOKEN_RESERVED, 0 },
     { nxt_string("protected"),     NJS_TOKEN_RESERVED, 0 },
     { nxt_string("public"),        NJS_TOKEN_RESERVED, 0 },
-    { nxt_string("short"),         NJS_TOKEN_RESERVED, 0 },
     { nxt_string("static"),        NJS_TOKEN_RESERVED, 0 },
     { nxt_string("super"),         NJS_TOKEN_RESERVED, 0 },
-    { nxt_string("synchronized"),  NJS_TOKEN_RESERVED, 0 },
-    { nxt_string("throws"),        NJS_TOKEN_RESERVED, 0 },
-    { nxt_string("transient"),     NJS_TOKEN_RESERVED, 0 },
-    { nxt_string("volatile"),      NJS_TOKEN_RESERVED, 0 },
 };
 
 
index 4ddd2bdfc1c09b9d9a8cd6dbb12e051cb4bd27a8..807e380f32fadb3407cb0a83b09f1f1537ff50d8 100644 (file)
@@ -58,7 +58,7 @@ njs_test {
 # Global completions, yes
 njs_test {
     {"\t\ty"
-     "\a\r\nDisplay all*possibilities? (y or n)*abstract"}
+     "\a\r\nDisplay all*possibilities? (y or n)*await"}
 }
 
 # Global completions, single partial match
@@ -130,7 +130,7 @@ njs_test {
     {"var a = 1; var aa = 2\r\n"
      "var a = 1; var aa = 2\r\nundefined\r\n>> "}
     {"a\t\t"
-     "a*aa*abstract"}
+     "a*aa*arguments*await"}
 }
 
 njs_test {