diff --git a/source/lexer.ll b/source/lexer.ll index 64c763a..2711b39 100644 --- a/source/lexer.ll +++ b/source/lexer.ll @@ -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(std::stoi(yytext + 3, nullptr, 16)); + + return yy::parser::make_CHARACTER(std::string(&character, 1), this->location); + } '\\[0nabtfrv\\'"?]' { switch (yytext[2]) {