Recognize hexadecimal sequences in the characters
This commit is contained in:
parent
0dc95d4466
commit
5548b66b15
@ -122,6 +122,11 @@ return {
|
||||
return yy::parser::make_CHARACTER(std::string(yytext, 1, 1), this->location);
|
||||
}
|
||||
}
|
||||
'\\x[0-9a-fA-F]{2}' {
|
||||
char character = static_cast<char>(std::stoi(yytext + 3, nullptr, 16));
|
||||
|
||||
return yy::parser::make_CHARACTER(std::string(&character, 1), this->location);
|
||||
}
|
||||
'\\[0nabtfrv\\'"?]' {
|
||||
switch (yytext[2])
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user