@@ -37,6 +37,7 @@ fn unescape(s: &str) -> String {
|
|||||||
.replace("\\\"", "\"")
|
.replace("\\\"", "\"")
|
||||||
.replace("\\\'", "\'")
|
.replace("\\\'", "\'")
|
||||||
.replace("\\\\", "\\")
|
.replace("\\\\", "\\")
|
||||||
|
.replace("0", "\0")
|
||||||
}
|
}
|
||||||
|
|
||||||
static BIN_OP_NAMES: LazyLock<HashMap<TokenKind, &'static str>> = LazyLock::new(|| {
|
static BIN_OP_NAMES: LazyLock<HashMap<TokenKind, &'static str>> = LazyLock::new(|| {
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ const NUMBER_START_CHARS: &str = "0123456789";
|
|||||||
const NUMBER_CHARS: &str = "0123456789.";
|
const NUMBER_CHARS: &str = "0123456789.";
|
||||||
const NUMBER_HEX_CHARS: &str = "0123456789ABCDEFabcdef";
|
const NUMBER_HEX_CHARS: &str = "0123456789ABCDEFabcdef";
|
||||||
const STRING_START_CHARS: &str = "'\"";
|
const STRING_START_CHARS: &str = "'\"";
|
||||||
const STRING_ESCAPES: &str = "nrt\\\"'";
|
const STRING_ESCAPES: &str = "nrt\\\"'0";
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Lexer
|
// Lexer
|
||||||
|
|||||||
Reference in New Issue
Block a user