From 260db0ba9ebe6b364872900d4ce9f3b1a78b39ec Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Sat, 16 Jan 2016 10:51:13 -0800 Subject: [PATCH] fix a couple regressions --- lips/Muncher.lua | 6 +++--- lips/Parser.lua | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) 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