[njs] Backed out changeset b3691d847ff4, reimplemented properly.

Dmitry Volyntsev xeioex at nginx.com
Thu Nov 22 15:12:38 UTC 2018


details:   https://hg.nginx.org/njs/rev/6577d408d494
branches:  
changeset: 666:6577d408d494
user:      Dmitry Volyntsev <xeioex at nginx.com>
date:      Thu Nov 22 18:12:26 2018 +0300
description:
Backed out changeset b3691d847ff4, reimplemented properly.

diffstat:

 njs/njs_parser.c |  36 ++++++++++++++++++------------------
 1 files changed, 18 insertions(+), 18 deletions(-)

diffs (53 lines):

diff -r b3691d847ff4 -r 6577d408d494 njs/njs_parser.c
--- a/njs/njs_parser.c	Thu Nov 22 17:38:40 2018 +0300
+++ b/njs/njs_parser.c	Thu Nov 22 18:12:26 2018 +0300
@@ -1696,23 +1696,7 @@ njs_parser_try_statement(njs_vm_t *vm, n
 
     parser->node = try;
 
-    switch (token) {
-
-    case NJS_TOKEN_SEMICOLON:
-    case NJS_TOKEN_LINE_END:
-        return njs_parser_token(parser);
-
-    case NJS_TOKEN_CLOSE_BRACE:
-    case NJS_TOKEN_END:
-        return token;
-
-    default:
-        if (parser->lexer->prev_token == NJS_TOKEN_LINE_END) {
-            return token;
-        }
-
-        return NJS_TOKEN_ILLEGAL;
-    }
+    return token;
 }
 
 
@@ -1758,7 +1742,23 @@ njs_parser_throw_statement(njs_vm_t *vm,
 
     parser->code_size += sizeof(njs_vmcode_throw_t);
 
-    return token;
+    switch (token) {
+
+    case NJS_TOKEN_SEMICOLON:
+    case NJS_TOKEN_LINE_END:
+        return njs_parser_token(parser);
+
+    case NJS_TOKEN_CLOSE_BRACE:
+    case NJS_TOKEN_END:
+        return token;
+
+    default:
+        if (parser->lexer->prev_token == NJS_TOKEN_LINE_END) {
+            return token;
+        }
+
+        return NJS_TOKEN_ILLEGAL;
+    }
 }
 
 


More information about the nginx-devel mailing list