support character literals in native compiler
This commit is contained in:
parent
356093e313
commit
dbe4c0b51a
@ -95,6 +95,12 @@ NOINLINE B nc_tokenize(B prims, B sysvs, u32* chars, usz len, bool* hasBlock) {
|
|||||||
i++;
|
i++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case '\'': { // character literal
|
||||||
|
if (i+1 >= len || chars[i+1] != '\'') thrM("Native compiler: Unclosed character literal");
|
||||||
|
val = nc_literal(m_c32(chars[i]));
|
||||||
|
i+= 2;
|
||||||
|
break;
|
||||||
|
}
|
||||||
case '#': { // comments
|
case '#': { // comments
|
||||||
while (i<len && chars[i]!='\n') i++;
|
while (i<len && chars[i]!='\n') i++;
|
||||||
val = m_c32(','); i++;
|
val = m_c32(','); i++;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user