fix identifier -> keyword conversion
This commit is contained in:
parent
ac23c0d2d7
commit
b591ecdf9b
1 changed files with 3 additions and 3 deletions
|
@ -249,6 +249,9 @@ pub const Scanner = struct {
|
|||
_ = self.advance();
|
||||
}
|
||||
|
||||
// ugly hack.
|
||||
self.rollback();
|
||||
|
||||
// after reading the identifier, we check
|
||||
// if it is any of our keywords, if it is, then we add
|
||||
// the specificed keyword type. if not, just .IDENTIFIER
|
||||
|
@ -261,9 +264,6 @@ pub const Scanner = struct {
|
|||
toktype = TokenType.Identifier;
|
||||
}
|
||||
|
||||
// ugly hack.
|
||||
self.rollback();
|
||||
|
||||
return self.makeToken(toktype);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue