mirror of
https://github.com/notwa/lips
synced 2024-05-04 18:33:23 -07:00
allow VARSYMs in directives
This commit is contained in:
parent
b596405e76
commit
51820234a8
|
@ -108,12 +108,12 @@ function Collector:directive()
|
||||||
if self:is_EOL() and name == 'ALIGN' then
|
if self:is_EOL() and name == 'ALIGN' then
|
||||||
add(name)
|
add(name)
|
||||||
else
|
else
|
||||||
local size = self:number()
|
local size = self:const(nil, 'no label')
|
||||||
if self:is_EOL() then
|
if self:is_EOL() then
|
||||||
add(name, size)
|
add(name, size)
|
||||||
else
|
else
|
||||||
self:optional_comma()
|
self:optional_comma()
|
||||||
add(name, size, self:number())
|
add(name, size, self:const(nil, 'no label'))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
elseif name == 'BYTE' or name == 'HALFWORD' or name == 'WORD' then
|
elseif name == 'BYTE' or name == 'HALFWORD' or name == 'WORD' then
|
||||||
|
|
|
@ -146,6 +146,9 @@ function Preproc:process(statements)
|
||||||
end
|
end
|
||||||
insert(new_statements, s)
|
insert(new_statements, s)
|
||||||
else
|
else
|
||||||
|
for j, t in ipairs(s) do
|
||||||
|
self:lookup(t)
|
||||||
|
end
|
||||||
insert(new_statements, s)
|
insert(new_statements, s)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue
Block a user