Compiler
Compiler copied to clipboard
Incorrect calculation of line and position in utf-8 files
Example code with an error on the last line:
type A {
some(arg: String = "πΊ πΈ πΉ π» πΌ π½ π πΏ πΎ"): Any
}
πΏ
Expected (line 5 and column 1):
Unrecognized token "πΏ" at line 5 and column 1:
πΏ
β <- arrow here
Actual (line 1 and column 89):
Unrecognized token "πΏ" at line 1 and column 89:
type A {
some(arg: String = "πΊ πΈ πΉ π» πΌ π½ π πΏ πΎ"): Any
}
πΏsome
β <- arrow here
@SerafimArts i might take a look at this bug, but please make it easy for me and provide runnable test code (i don't need a full hoa Test case).
It would be good to fix this bug together with #97 at the same time.
Just write any character from the UTF 4bytes group to reproduce the problem.
grammar:
%skip space \s
text:
πΊ πΈ πΉ π» πΌ π½ π πΏ πΎ