mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Remove the \b, \f, \v escape sequences from the Scanner
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
contract test {
|
||||
function f() public pure returns (bytes32) {
|
||||
bytes32 escapeCharacters = "\t\n\r\'\"\\";
|
||||
return escapeCharacters;
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f() -> 0x090a0d27225c0000000000000000000000000000000000000000000000000000
|
||||
@@ -0,0 +1,8 @@
|
||||
contract test {
|
||||
function f() public pure returns (bytes32) {
|
||||
bytes32 escapeCharacters = "\t\b\f";
|
||||
return escapeCharacters;
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// ParserError 8936: (100-105): Invalid escape sequence.
|
||||
@@ -1,6 +1,6 @@
|
||||
contract test {
|
||||
function f() public pure returns (bytes32) {
|
||||
bytes32 escapeCharacters = "\t\b\n\r\f\'\"\\\b";
|
||||
bytes32 escapeCharacters = "\n\r\'\"\\";
|
||||
return escapeCharacters;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user