Skip to content

Commit f0e432c

Browse files
authored
Set post-processing mode after an arrow expression scanning is completed (#3215)
Fixes #3214. JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
1 parent 84a56ef commit f0e432c

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

jerry-core/parser/js/js-scanner.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -810,6 +810,7 @@ scanner_scan_primary_expression_end (parser_context_t *context_p, /**< context *
810810
case SCAN_STACK_ARROW_EXPRESSION:
811811
{
812812
parser_stack_pop_uint8 (context_p);
813+
scanner_context_p->mode = SCAN_MODE_POST_PRIMARY_EXPRESSION;
813814
return SCAN_KEEP_TOKEN;
814815
}
815816
#endif /* ENABLED (JERRY_ES2015_ARROW_FUNCTION) */
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Copyright JS Foundation and other contributors, http://js.foundation
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
var $ = { $ ( ){ } } = { g ( ) { ( ) => m ++ ( ) } } = class extends C { constructor ( ) { super () } }

0 commit comments

Comments
 (0)