bfa5f27847
Currently, we deal with escape sequences twice: once when we lex a string, and a second time when we unescape literals. This PR aims to remove this duplication, by introducing a new `unescape` mode as a single source of truth for character escaping rules
27 lines
576 B
Plaintext
27 lines
576 B
Plaintext
error: numeric character escape is too short
|
|
--> $DIR/lex-bad-char-literals-1.rs:3:6
|
|
|
|
|
LL | '\x1'
|
|
| ^^^
|
|
|
|
error: numeric character escape is too short
|
|
--> $DIR/lex-bad-char-literals-1.rs:7:6
|
|
|
|
|
LL | "\x1"
|
|
| ^^^
|
|
|
|
error: unknown character escape: \u{25cf}
|
|
--> $DIR/lex-bad-char-literals-1.rs:11:7
|
|
|
|
|
LL | '\●'
|
|
| ^ unknown character escape
|
|
|
|
error: unknown character escape: \u{25cf}
|
|
--> $DIR/lex-bad-char-literals-1.rs:15:7
|
|
|
|
|
LL | "\●"
|
|
| ^ unknown character escape
|
|
|
|
error: aborting due to 4 previous errors
|
|
|