From f630990c6ebbc7c4df3ab83cd379764f4f4c8224 Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Tue, 5 Jan 2016 16:45:53 -0800 Subject: [PATCH] disallow 0 in place of r0/zero register --- lips.lua | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lips.lua b/lips.lua index d25b10c..03d8d67 100644 --- a/lips.lua +++ b/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