Project

General

Profile

Bug #732

While without Wend, For without Next, If without End If display incorrect errors in the AOZ Messages (but a mostly correct message on the JavaScript console)

Added by Brian Flanagan almost 3 years ago. Updated over 2 years ago.

Status:
Feedback
Priority:
High
Target version:
-
Start date:
04/23/2021
Due date:
% Done:

0%

Estimated time:
1:00 h
Affected version:

Description

For example:

If true
    x=1
Else
    x=2
End

The resulting error message in AOZ Messages is:

Compiling %1
Generating code...
Error: %1 at line 0, column 2, in file IfEndIf.aoz

Task failed, no code generated...

On the JavaScript console, however, I get:

/Users/USERNAME/Documents/My AOZ Applications/Syntax_Error/Syntax_Error.aoz:0:2: error: If without endif

...which is almost right except that it points to line 0 as the error line. (should be 1)

I get similar results for While without Wend, For without Next, etc.

#1

Updated by Brian Flanagan almost 3 years ago

  • Priority changed from Normal to High
#2

Updated by Brian Flanagan almost 3 years ago

  • Assignee set to Baptiste Bideaux
#3

Updated by Brian Flanagan over 2 years ago

  • Status changed from New to Feedback

Re-tested in 1.0.0 (B8) u16
Now partially working.
If without End If is properly displayed, but the line number is wrong.

While Without Wend is also properly displayed, but with the line number one less than it should be.
For without Next is also properly displayed, but with the line number 1 too small.

Line numbers in the error messages are incorrectly starting at 0.

Line numbers start at 1 in the editor, as they should in the error messages.

We also need to make sure that things are handled properly when we're dealing with a numeric label vs. the number of the line in the editor.

#4

Updated by Brian Flanagan over 2 years ago

  • Affected version changed from 1.0.0 (B7) to 1.0.0 (B10) u16

Also available in: Atom PDF