Skip to content
Open
Changes from all commits
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
11 changes: 9 additions & 2 deletions jerry-core/parser/js/js-parser-expr.c
Original file line number Diff line number Diff line change
Expand Up @@ -857,8 +857,15 @@ parser_parse_class_body (parser_context_t *context_p, /**< context */

parser_stack_push (context_p, &range.start_location, sizeof (scanner_location_t));
fields_size += sizeof (scanner_location_t);

lexer_consume_next_character (context_p);

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

if (JERRY_UNLIKELY(context_p->source_p >= context_p->source_end_p))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (JERRY_UNLIKELY(context_p->source_p >= context_p->source_end_p))
if (JERRY_UNLIKELY (context_p->source_p >= context_p->source_end_p))

{
parser_raise_error (context_p, PARSER_ERR_PROPERTY_IDENTIFIER_EXPECTED);
}
else
{
lexer_consume_next_character (context_p);
}
Comment on lines +865 to +868
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we don't need else as parser_raise_error will stop the execution.

Suggested change
else
{
lexer_consume_next_character (context_p);
}
lexer_consume_next_character (context_p);

}
else if (lexer_consume_assign (context_p))
{
Expand Down