mirror of
https://github.com/notwa/lips
synced 2024-11-14 17:49:02 -08:00
set all lexer states at EOF
This commit is contained in:
parent
3ea0184fb6
commit
c978d4914f
1 changed files with 4 additions and 0 deletions
4
lips.lua
4
lips.lua
|
@ -470,7 +470,9 @@ end
|
|||
function Lexer:nextc()
|
||||
if self.pos > #self.asm then
|
||||
self.ord = self.EOF
|
||||
self.ord2 = self.EOF
|
||||
self.chr = ''
|
||||
self.chr2 = ''
|
||||
self.chrchr = ''
|
||||
return
|
||||
end
|
||||
|
@ -496,6 +498,8 @@ function Lexer:nextc()
|
|||
self.chr2 = string.char(self.ord2)
|
||||
self.chrchr = string.char(self.ord, self.ord2)
|
||||
else
|
||||
self.ord2 = self.EOF
|
||||
self.chr2 = ''
|
||||
self.chrchr = self.chr
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue