diff --git a/lips/Muncher.lua b/lips/Muncher.lua index 42cefd4..db54263 100644 --- a/lips/Muncher.lua +++ b/lips/Muncher.lua @@ -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() diff --git a/lips/Parser.lua b/lips/Parser.lua index f68faac..e16e933 100644 --- a/lips/Parser.lua +++ b/lips/Parser.lua @@ -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