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;
}
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;
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);
}
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;
}