Created
January 27, 2019 08:37
-
-
Save xeioex/8cc4ff79ae5cff4cb1ae10be08f02372 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/njs/njs_parser.c b/njs/njs_parser.c | |
| --- a/njs/njs_parser.c | |
| +++ b/njs/njs_parser.c | |
| @@ -878,12 +878,6 @@ njs_parser_export_statement(njs_vm_t *vm | |
| } | |
| } | |
| - if (parser->mode == NJS_PARSER_MODE_SCRIPT || scope->nesting != 0) { | |
| - njs_parser_syntax_error(vm, parser, "Illegal export statement"); | |
| - | |
| - return NXT_ERROR; | |
| - } | |
| - | |
| return njs_parser_return(vm, parser); | |
| } | |
| @@ -1811,12 +1805,6 @@ njs_parser_import_statement(njs_vm_t *vm | |
| njs_variable_t *var; | |
| njs_parser_node_t *name, *import; | |
| - if (parser->scope->type != NJS_SCOPE_GLOBAL) { | |
| - njs_parser_syntax_error(vm, parser, "Illegal import statement"); | |
| - | |
| - return NXT_ERROR; | |
| - } | |
| - |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment