mirror of
https://github.com/notwa/lips
synced 2024-11-14 09:59:03 -08:00
disallow 0 in place of r0/zero register
This commit is contained in:
parent
361b0572f6
commit
f630990c6e
1 changed files with 1 additions and 6 deletions
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 a new issue