1
0
Fork 0
mirror of https://github.com/notwa/lips synced 2024-11-14 17:29:03 -08:00

remove debugging stuff; add fixme

This commit is contained in:
Connor Olding 2015-12-25 00:14:37 -08:00
parent 67b36f2b07
commit 164b4ceae2

View file

@ -669,13 +669,11 @@ end
function Lexer:lex_string(yield)
-- TODO: support escaping
if self.chr ~= '"' then
print(self.chr, self.ord)
self:error("expected opening double quote")
end
self:nextc()
local buff = self:read_chars('[^"\n]')
if self.chr ~= '"' then
print(self.chr)
self:error("expected closing double quote")
end
self:nextc()
@ -1018,6 +1016,8 @@ function Parser:instruction()
local h = instructions[name]
self:advance()
-- FIXME: errors thrown here probably have the wrong line number (+1)
if h == nil then
self:error('undefined instruction')
elseif h == 'LI' then
@ -1346,7 +1346,6 @@ function Parser:parse(asm)
end
function Dumper:error(msg)
--error(string.format('%s:%d: Dumper Error: %s', '(code)', self.pos, msg), 2)
error(string.format('%s:%d: Error: %s', self.fn, self.line, msg), 2)
end