bmx-ng / bcc

A next-generation bcc parser for BlitzMax
zlib License
33 stars 12 forks source link

Multi-Line strings lead to incorrect error line numbers #670

Open GWRon opened 3 weeks ago

GWRon commented 3 weeks ago

When using multi-line strings potential errors (after the multi-line definition) are incorrectly offset by "multi-line line count - 1" .

SuperStrict
Framework Brl.StandardIO

Local multiLine:String = """
hello
world
hallo
welt
bonjour
monde
"""

Local i:Int = 12

syntaxerror

Local i2:Int = 13

Function AdditionalText()
    Print 1
    Print 2
    Print 3
End Function

Output:

Compile Error: Identifier 'syntaxerror' not found.
[/home/ronny/Arbeit/Tools/BlitzMaxNG/tmp/untitled1.bmx;22;0]

image