reading & showing unicode identifiers

This commit is contained in:
krangelov
2021-08-27 14:44:42 +02:00
parent 41ef5f9539
commit 3e7d80bf30
5 changed files with 80 additions and 7 deletions

View File

@@ -160,7 +160,7 @@ bool PgfExprParser::eof()
return (token_tag == PGF_TOKEN_EOF);
}
static bool
PGF_INTERNAL bool
pgf_is_ident_first(uint32_t ucs)
{
return (ucs == '_') ||
@@ -169,7 +169,7 @@ pgf_is_ident_first(uint32_t ucs)
(ucs >= 192 && ucs <= 255 && ucs != 247 && ucs != 215);
}
static bool
PGF_INTERNAL bool
pgf_is_ident_rest(uint32_t ucs)
{
return (ucs == '_') ||
@@ -211,6 +211,9 @@ void PgfExprParser::str_char()
case '"':
putc('\"');
break;
case '\'':
putc('\'');
break;
case 'n':
putc('\n');
break;