diff --git a/Lua/lib/lips/Dumper.lua b/Lua/lib/lips/Dumper.lua index fb54c93..2448e8b 100644 --- a/Lua/lib/lips/Dumper.lua +++ b/Lua/lib/lips/Dumper.lua @@ -85,7 +85,8 @@ function Dumper:add_directive(fn, line, name, a, b) self:add_bytes(line, b1, b0) elseif name == 'WORD' then if type(a) == 'string' then - local t = {line=line, kind='label', name=a} + t.kind = 'label' + t.name = a insert(self.commands, t) self:advance(4) else @@ -270,7 +271,7 @@ function Dumper:dump() self.pos = self.pos + t.skip end elseif t.kind == 'label' then - local val = self:desym{'LABELSYM', t.name} + local val = self:desym{tt='LABELSYM', tok=t.name} val = (val % 0x80000000) + 0x80000000 local b0 = bitrange(val, 0, 7) local b1 = bitrange(val, 8, 15) diff --git a/Lua/lib/lips/Parser.lua b/Lua/lib/lips/Parser.lua index e16e933..eaf1f92 100644 --- a/Lua/lib/lips/Parser.lua +++ b/Lua/lib/lips/Parser.lua @@ -29,7 +29,7 @@ function Parser:directive() if self:is_EOL() and name == 'ALIGN' then add(name, 0) else - local size = self:number() + local size = self:number().tok if self:is_EOL() then add(name, size) else