mirror of
https://github.com/notwa/lips
synced 2024-05-05 10:53:23 -07:00
disallow 0 in place of r0/zero register
This commit is contained in:
parent
361b0572f6
commit
f630990c6e
7
lips.lua
7
lips.lua
|
@ -899,12 +899,7 @@ end
|
|||
function Parser:register(t)
|
||||
t = t or registers
|
||||
if self.tt ~= 'REG' then
|
||||
if self.tt == 'NUM' and self.tok == '0' then
|
||||
self.tt = 'REG'
|
||||
self.tok = 'R0'
|
||||
else
|
||||
self:error('expected register')
|
||||
end
|
||||
self:error('expected register')
|
||||
end
|
||||
local reg = self.tok
|
||||
if not t[reg] then
|
||||
|
|
Loading…
Reference in New Issue
Block a user