1
0
Fork 0
mirror of https://github.com/notwa/lips synced 2024-05-03 01:53:23 -07:00

set all lexer states at EOF

This commit is contained in:
Connor Olding 2015-11-26 19:28:14 -08:00
parent 3ea0184fb6
commit c978d4914f

View File

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