1
0
Fork 0
mirror of https://github.com/notwa/lips synced 2024-11-14 10:09:03 -08:00

fix a couple regressions

This commit is contained in:
Connor Olding 2016-01-16 10:51:13 -08:00
parent 07c68b6229
commit 260db0ba9e
2 changed files with 4 additions and 4 deletions

View file

@ -115,12 +115,12 @@ function Muncher:const(relative, no_label)
if no_label and self.tt == 'LABELSYM' then
self:error('labels are not allowed here')
end
local t = self:token(self.t)
if relative and self.tt == 'LABELSYM' then
self.tt = 'LABELREL'
t.tt = 'LABELREL'
end
local t = self.t
self:advance()
return self:token(t)
return t
end
function Muncher:special()

View file

@ -58,7 +58,7 @@ function Parser:directive()
-- noop, handled by lexer
elseif name == 'ASCII' or name == 'ASCIIZ' then
local bytes = self:string()
for i, number in ipairs(bytes) do
for i, number in ipairs(bytes.tok) do
add('BYTE', number)
end
if name == 'ASCIIZ' then