stage2: Allow \t in string literals
Lift the ban on literal tab chars in string literals as they have nothing to do with code formatting.master
parent
48dc3b6fe9
commit
0a2519fafb
|
@ -848,6 +848,7 @@ pub const Tokenizer = struct {
|
|||
self.index += 1;
|
||||
break;
|
||||
},
|
||||
'\t' => {},
|
||||
else => self.checkLiteralCharacter(),
|
||||
},
|
||||
|
||||
|
@ -1687,6 +1688,14 @@ test "tokenizer - string identifier and builtin fns" {
|
|||
});
|
||||
}
|
||||
|
||||
test "tokenizer - multiline string literal with literal tab" {
|
||||
testTokenize(
|
||||
\\\\foo bar
|
||||
, &[_]Token.Id{
|
||||
Token.Id.MultilineStringLiteralLine,
|
||||
});
|
||||
}
|
||||
|
||||
test "tokenizer - pipe and then invalid" {
|
||||
testTokenize("||=", &[_]Token.Id{
|
||||
Token.Id.PipePipe,
|
||||
|
|
Loading…
Reference in New Issue