mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Allow hex string literals in Yul.
This commit is contained in:
@@ -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'
|
||||
Reference in New Issue
Block a user