Closed jchros closed 1 year ago
While working on #6, I identified a case where the parser emits an incorrect syntax tree, for the following code:
y = x < 10 OR x = 10.
Here's the emitted syntax tree:
(source_code (statement (variable_assignment (assignment (identifier) (expression (comparison (expression (identifier)) (comparator) (expression (logical_expression (expression (number_literal)) (logical_operator) (expression (comparison (expression (identifier)) (comparator) (expression (number_literal))))))))) (terminator))))
The code is parsed as if it were equivalent to:
y = (x < (10 OR (x = 10))).
But the OpenEdge ABL parses it as:
y = ((x < 10) OR (x = 10)).
While working on #6, I identified a case where the parser emits an incorrect syntax tree, for the following code:
Here's the emitted syntax tree:
The code is parsed as if it were equivalent to:
But the OpenEdge ABL parses it as: