[njs] Updated list of reserved keywords.

Dmitry Volyntsev xeioex at nginx.com
Fri Feb 8 17:20:22 UTC 2019


details:   https://hg.nginx.org/njs/rev/cb7ccf9edc68
branches:  
changeset: 769:cb7ccf9edc68
user:      Dmitry Volyntsev <xeioex at nginx.com>
date:      Fri Feb 08 20:06:05 2019 +0300
description:
Updated list of reserved keywords.

diffstat:

 njs/njs_lexer_keyword.c      |  18 ++----------------
 njs/test/njs_expect_test.exp |   4 ++--
 2 files changed, 4 insertions(+), 18 deletions(-)

diffs (64 lines):

diff -r 2feb1b5a210d -r cb7ccf9edc68 njs/njs_lexer_keyword.c
--- a/njs/njs_lexer_keyword.c	Thu Feb 07 20:05:16 2019 +0300
+++ b/njs/njs_lexer_keyword.c	Fri Feb 08 20:06:05 2019 +0300
@@ -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 },
 };
 
 
diff -r 2feb1b5a210d -r cb7ccf9edc68 njs/test/njs_expect_test.exp
--- a/njs/test/njs_expect_test.exp	Thu Feb 07 20:05:16 2019 +0300
+++ b/njs/test/njs_expect_test.exp	Fri Feb 08 20:06:05 2019 +0300
@@ -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 {


More information about the nginx-devel mailing list