Skip to content

Fixed frame saving for awaited function with closures. #928

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 17, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Parser: unused strict_semicolon cleanup.
  • Loading branch information
xeioex committed Jun 16, 2025
commit 05c7246f91de53fbdbe5f1afe19453d28ea44e37
22 changes: 7 additions & 15 deletions src/njs_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -839,10 +839,9 @@ njs_inline njs_int_t
njs_parser_expect_semicolon(njs_parser_t *parser, njs_lexer_token_t *token)
{
if (token->type != NJS_TOKEN_SEMICOLON) {
if (parser->strict_semicolon
|| (token->type != NJS_TOKEN_END
&& token->type != NJS_TOKEN_CLOSE_BRACE
&& parser->lexer->prev_type != NJS_TOKEN_LINE_END))
if (token->type != NJS_TOKEN_END
&& token->type != NJS_TOKEN_CLOSE_BRACE
&& parser->lexer->prev_type != NJS_TOKEN_LINE_END)
{
return NJS_DECLINED;
}
Expand Down Expand Up @@ -5408,10 +5407,6 @@ static njs_int_t
njs_parser_do_while_semicolon(njs_parser_t *parser, njs_lexer_token_t *token,
njs_queue_link_t *current)
{
if (parser->strict_semicolon) {
return njs_parser_failed(parser);
}

parser->target->right = parser->node;
parser->node = parser->target;

Expand Down Expand Up @@ -6257,10 +6252,9 @@ njs_parser_break_continue(njs_parser_t *parser, njs_lexer_token_t *token,
break;
}

if (parser->strict_semicolon
|| (token->type != NJS_TOKEN_END
&& token->type != NJS_TOKEN_CLOSE_BRACE
&& parser->lexer->prev_type != NJS_TOKEN_LINE_END))
if (token->type != NJS_TOKEN_END
&& token->type != NJS_TOKEN_CLOSE_BRACE
&& parser->lexer->prev_type != NJS_TOKEN_LINE_END)
{
return njs_parser_failed(parser);
}
Expand Down Expand Up @@ -6314,9 +6308,7 @@ njs_parser_return_statement(njs_parser_t *parser, njs_lexer_token_t *token,
return njs_parser_failed(parser);

default:
if (!parser->strict_semicolon
&& parser->lexer->prev_type == NJS_TOKEN_LINE_END)
{
if (parser->lexer->prev_type == NJS_TOKEN_LINE_END) {
break;
}

Expand Down
1 change: 0 additions & 1 deletion src/njs_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ struct njs_parser_s {
uint8_t use_lhs;

uint8_t module;
njs_bool_t strict_semicolon;

njs_str_t file;
uint32_t line;
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy