Description
There is inconsistent and unexpected behavior when parsing expressions that include nested comments.
Depending on whether a semicolon is present after the comment block, different and misleading errors are thrown.
Reproduction
Input A
/*
a ?? b;
/* nested comment */
a ?? b;
*/
1
Error
The left side of the "/" operator must evaluate to a number
Input B
/*
a ?? b;
/* nested comment */
a ?? b;
*/;
1
Error
Semicolon ";" cannot be used here. Semicolons are used to separate sub-expressions in top-level mappings, parenthesis blocks and function definitions.
Description
There is inconsistent and unexpected behavior when parsing expressions that include nested comments.
Depending on whether a semicolon is present after the comment block, different and misleading errors are thrown.
Reproduction
Input A
Error
Input B
Error