]> git.kaiwu.me - njs.git/commitdiff
Simplified parser builtin function.
authorhongzhidao <hongzhidao@gmail.com>
Fri, 1 Feb 2019 11:48:30 +0000 (19:48 +0800)
committerhongzhidao <hongzhidao@gmail.com>
Fri, 1 Feb 2019 11:48:30 +0000 (19:48 +0800)
njs/njs_parser.c
njs/njs_variable.c

index 2abd423b667c9d33b06b6814b14f73cbf24f4616..bd767a862902deee1c57129792d6e27101a9e101 100644 (file)
@@ -2095,8 +2095,6 @@ njs_parser_builtin_object(njs_vm_t *vm, njs_parser_t *parser,
         return NJS_TOKEN_ERROR;
     }
 
-    node->scope = parser->scope;
-
     parser->node = node;
 
     return njs_parser_token(parser);
@@ -2139,8 +2137,6 @@ njs_parser_builtin_function(njs_vm_t *vm, njs_parser_t *parser,
         return NJS_TOKEN_ERROR;
     }
 
-    node->scope = parser->scope;
-
     parser->node = node;
 
     return njs_parser_token(parser);
index 6bc8892c5b2bf8ab79140a93a3a9691d9886f316..0a364363b0884d878813a42aafc7469ce6959589 100644 (file)
@@ -132,7 +132,6 @@ njs_variable_reference(njs_vm_t *vm, njs_parser_scope_t *scope,
     ret = njs_name_copy(vm, &vr->name, name);
 
     if (nxt_fast_path(ret == NXT_OK)) {
-        node->scope = scope;
         vr->hash = hash;
         vr->type = type;