mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 04:48:20 +00:00
Tokenize '&&' as AmpersandAmpersand
This commit is contained in:
parent
af8661405b
commit
d4ff27180b
@ -125,6 +125,7 @@ pub const Token = struct {
|
||||
SlashEqual,
|
||||
Comma,
|
||||
Ampersand,
|
||||
AmpersandAmpersand,
|
||||
AmpersandEqual,
|
||||
QuestionMark,
|
||||
AngleBracketLeft,
|
||||
@ -484,6 +485,10 @@ pub const Tokenizer = struct {
|
||||
},
|
||||
|
||||
State.Ampersand => switch (c) {
|
||||
'&' => {
|
||||
result.id = Token.Id.AmpersandAmpersand;
|
||||
break;
|
||||
},
|
||||
'=' => {
|
||||
result.id = Token.Id.AmpersandEqual;
|
||||
self.index += 1;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user