File tree Expand file tree Collapse file tree 4 files changed +50
-2
lines changed Expand file tree Collapse file tree 4 files changed +50
-2
lines changed Original file line number Diff line number Diff line change @@ -2338,7 +2338,7 @@ parser_parse_statements (parser_context_t *context_p) /**< context */
2338
2338
case LEXER_KEYW_CLASS :
2339
2339
{
2340
2340
parser_parse_class (context_p , true);
2341
- continue ;
2341
+ goto consume_last_statement ;
2342
2342
}
2343
2343
#endif /* ENABLED (JERRY_ES2015_CLASS) */
2344
2344
@@ -2359,7 +2359,7 @@ parser_parse_statements (parser_context_t *context_p) /**< context */
2359
2359
case LEXER_KEYW_FUNCTION :
2360
2360
{
2361
2361
parser_parse_function_statement (context_p );
2362
- continue ;
2362
+ goto consume_last_statement ;
2363
2363
}
2364
2364
2365
2365
case LEXER_KEYW_IF :
@@ -2665,6 +2665,7 @@ parser_parse_statements (parser_context_t *context_p) /**< context */
2665
2665
parser_raise_error (context_p , PARSER_ERR_SEMICOLON_EXPECTED );
2666
2666
}
2667
2667
2668
+ consume_last_statement :
2668
2669
while (true)
2669
2670
{
2670
2671
switch (context_p -> stack_top_uint8 )
Original file line number Diff line number Diff line change
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
+ do class $ { } while ( 0 ) ;
Original file line number Diff line number Diff line change
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
+ if ( $ )
16
+ function $ ( ) { } ;
17
+ else if ( b ) c
Original file line number Diff line number Diff line change
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
+ do function $ ( ) { } while ( 0 ) ;
You can’t perform that action at this time.
0 commit comments