mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Expose hex literal to the Yul parser
This allows nicer error messages.
This commit is contained in:
@@ -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
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user