Allow hex string literals in Yul.

This commit is contained in:
chriseth
2021-04-08 15:03:33 +02:00
parent 6d6112a81b
commit f04adde664
18 changed files with 64 additions and 12 deletions
@@ -6,4 +6,3 @@ contract C {
}
}
// ----
// ParserError 3772: (72-81): Hex literals are not valid in this context.
@@ -6,4 +6,3 @@ contract C {
}
}
// ----
// ParserError 3772: (67-76): Hex literals are not valid in this context.
@@ -8,4 +8,3 @@ contract C {
}
}
// ----
// ParserError 3772: (92-99): Hex literals are not valid in this context.
@@ -0,0 +1,9 @@
contract C {
function f() public pure {
assembly {
let x := hex"12__34";
}
}
}
// ----
// ParserError 1465: (84-92): Illegal token: Invalid use of number separator '_'.
@@ -0,0 +1,9 @@
contract C {
function f() public pure {
assembly {
let x := hex"abxy";
}
}
}
// ----
// ParserError 1465: (84-90): Illegal token: Expected even number of hex-nibbles.
@@ -0,0 +1,5 @@
function g() pure {
assembly { let hex := 1 }
}
// ----
// ParserError 2314: (39-42): Expected identifier but got 'ILLEGAL'