Details
A non semicolon-terminated invocation gets parsed as an expression rather than a statement
Expected parse tree
[statement] / statement_expression / invokation
(compilation_unit ; [0, 0] - [3, 0]
(decl_method ; [0, 0] - [2, 1]
return_type: (type_void) ; [0, 0] - [0, 4]
name: (identifier) ; [0, 5] - [0, 8]
body: (block ; [0, 11] - [2, 1]
(statement_expression ; [1, 1] - [1, 7]
(invokation ; [1, 1] - [1, 6]
invoked: (identifier) ; [1, 1] - [1, 4]
(actual_parameters)))))) ; [1, 4] - [1, 6]
Actual parse tree
[_expression] / invokation
(compilation_unit ; [0, 0] - [3, 0]
(decl_method ; [0, 0] - [2, 1]
return_type: (type_void) ; [0, 0] - [0, 4]
name: (identifier) ; [0, 5] - [0, 8]
body: (block ; [0, 11] - [2, 1]
(invokation ; [1, 1] - [1, 6]
invoked: (identifier) ; [1, 1] - [1, 4]
(actual_parameters))))) ; [1, 4] - [1, 6]
Details
A non semicolon-terminated invocation gets parsed as an expression rather than a statement
Expected parse tree
[statement] / statement_expression / invokationActual parse tree
[_expression] / invokation