Tokenize '&&' as AmpersandAmpersand

master
Benjamin Feng 2019-06-12 14:00:25 -05:00 committed by Andrew Kelley
parent af8661405b
commit d4ff27180b
No known key found for this signature in database
GPG Key ID: 7C5F548F728501A9
1 changed files with 5 additions and 0 deletions

View File

@ -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;