You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
cppfront produces an error when parsing a UTF-8 character literal (u8) which is not a hex character.
To Reproduce
Run cppfront on this code:
main: () -> int = {
a:= u8'a'; // ok
b:= u8'b'; // ok
c:= u8'c'; // ok
d:= u8'd'; // ok
e:= u8'e'; // ok
f:= u8'f'; // ok
g:= u8'g'; // error: line ended before character literal was terminatedreturn0;
}
Thanks, I found the problem. It turns out I need to also check the encoding prefixes when doing the load.h brace-match to find the end of the Cpp2 definition, which also needs to be aware of literals (in case braces we should ignore are hiding inside a literal). Fixing...
Describe the bug
cppfront produces an error when parsing a UTF-8 character literal (
u8
) which is not a hex character.To Reproduce
Run cppfront on this code:
Repro
The text was updated successfully, but these errors were encountered: