1
0
Fork 0
mirror of https://github.com/notwa/lips synced 2024-04-24 23:03:22 -07:00

allow VARSYMs in directives

This commit is contained in:
Connor Olding 2016-05-01 03:56:56 -07:00
parent b596405e76
commit 51820234a8
2 changed files with 5 additions and 2 deletions

View File

@ -108,12 +108,12 @@ function Collector:directive()
if self:is_EOL() and name == 'ALIGN' then
add(name)
else
local size = self:number()
local size = self:const(nil, 'no label')
if self:is_EOL() then
add(name, size)
else
self:optional_comma()
add(name, size, self:number())
add(name, size, self:const(nil, 'no label'))
end
end
elseif name == 'BYTE' or name == 'HALFWORD' or name == 'WORD' then

View File

@ -146,6 +146,9 @@ function Preproc:process(statements)
end
insert(new_statements, s)
else
for j, t in ipairs(s) do
self:lookup(t)
end
insert(new_statements, s)
end
else