Closed
Description
Title: Wrong location for ill formed definitions
Description:
A wrong definition like int a = 4;
should be reported with the correct line.
Minimal reproducer (https://cpp2.godbolt.org/z/vcb5xWKxz):
func: () = {
a : int = 5;
int b = 4;
c: int = 3;
}
Commands:
cppfront main.cpp2 -o main.cpp
Expected result:
main.cpp2(3,12): error: ill-formed initializer (at ' int b = 4;')
main.cpp2(1,1): error: unexpected text at end of Cpp2 code section (at 'func')
main.cpp2(1,0): error: parse failed for section starting here
Actual result and error:
main.cpp2(1,12): error: ill-formed initializer (at '{')
main.cpp2(1,1): error: unexpected text at end of Cpp2 code section (at 'func')
main.cpp2(1,0): error: parse failed for section starting here