voc icon indicating copy to clipboard operation
voc copied to clipboard

failure to handle comments

Open norayr opened this issue 9 years ago • 1 comments

IF prev = 3AX (* : *) THEN
                    ^
pos  1956  err 100  incompatible operands of dyadic operator

norayr avatar May 13 '16 10:05 norayr

I assume that the operands of '=' are incompatible? Basically the compiler records the position of the first symbol after the error (THEN in this case) and displays the error pointer one char earlier. (The comment is not a symbol.)

Another error position issue I've seen is that an error in expr in WHILE expr DO statements END is shown at the end of the statements rather than at the end of the expression.

I spent long enough looking at the position recording code to decide that it needed a few days of intense analysis to fix overall.

dcwbrown avatar Jul 07 '16 14:07 dcwbrown