cppfront icon indicating copy to clipboard operation
cppfront copied to clipboard

[BUG] Error parsing UTF-8 character literal that is not a hex character

Open bluetarpmedia opened this issue 8 months ago • 3 comments

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 terminated

    return 0;
}

Repro

bluetarpmedia avatar Jun 24 '24 03:06 bluetarpmedia