Expose hex literal to the Yul parser

This allows nicer error messages.
This commit is contained in:
Alex Beregszaszi
2020-08-28 19:34:52 +01:00
parent 26a76c18d4
commit 7ef9591e64
12 changed files with 18 additions and 18 deletions
+1 -1
View File
@@ -668,7 +668,7 @@ void Scanner::scanToken()
tie(token, m, n) = scanIdentifierOrKeyword();
// Special case for hexadecimal literals
if (token == Token::Hex && m_kind != ScannerKind::Yul)
if (token == Token::Hex)
{
// reset
m = 0;
+1 -1
View File
@@ -324,7 +324,7 @@ namespace TokenTraits
{
return tok == Token::Function || tok == Token::Let || tok == Token::If || tok == Token::Switch || tok == Token::Case ||
tok == Token::Default || tok == Token::For || tok == Token::Break || tok == Token::Continue || tok == Token::Leave ||
tok == Token::TrueLiteral || tok == Token::FalseLiteral;
tok == Token::TrueLiteral || tok == Token::FalseLiteral || tok == Token::HexStringLiteral || tok == Token::Hex;
}
inline Token AssignmentToBinaryOp(Token op)