Lexer: byte strings sufixes
This commit is contained in:
parent
2f24fb4f2c
commit
b704eb708f
@ -123,7 +123,11 @@ fn next_token_inner(c: char, ptr: &mut Ptr) -> SyntaxKind {
|
|||||||
scan_literal_suffix(ptr);
|
scan_literal_suffix(ptr);
|
||||||
CHAR
|
CHAR
|
||||||
},
|
},
|
||||||
'b' => return scan_byte_char_or_string(ptr),
|
'b' => {
|
||||||
|
let kind = scan_byte_char_or_string(ptr);
|
||||||
|
scan_literal_suffix(ptr);
|
||||||
|
return kind
|
||||||
|
},
|
||||||
_ => (),
|
_ => (),
|
||||||
}
|
}
|
||||||
ERROR
|
ERROR
|
||||||
|
@ -1 +1,2 @@
|
|||||||
b'' b'x' b"foo" br""
|
b'' b'x' b"foo" br""
|
||||||
|
b''suf b""ix br""br
|
||||||
|
@ -5,3 +5,10 @@ WHITESPACE 1 " "
|
|||||||
BYTE_STRING 6 "b\"foo\""
|
BYTE_STRING 6 "b\"foo\""
|
||||||
WHITESPACE 1 " "
|
WHITESPACE 1 " "
|
||||||
RAW_BYTE_STRING 4 "br\"\""
|
RAW_BYTE_STRING 4 "br\"\""
|
||||||
|
WHITESPACE 1 "\n"
|
||||||
|
BYTE 6 "b\'\'suf"
|
||||||
|
WHITESPACE 1 " "
|
||||||
|
BYTE_STRING 5 "b\"\"ix"
|
||||||
|
WHITESPACE 1 " "
|
||||||
|
RAW_BYTE_STRING 6 "br\"\"br"
|
||||||
|
WHITESPACE 1 "\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user