1
0
Fork 0
mirror of https://github.com/notwa/mm synced 2024-11-05 02:29:03 -08:00

update lips

This commit is contained in:
Connor Olding 2018-11-28 02:55:01 +01:00
parent 35132653f6
commit e762bbd037

View file

@ -155,7 +155,7 @@ function Expression:lex1(str, tokens)
return "bad binary number: "..considered..here
end
num = tonumber(considered:sub(2), 2)
elseif consider('$[0-9A-Fa-f]+') then
elseif consider('[$][0-9A-Fa-f]+') then
num = tonumber(considered:sub(2), 16)
elseif consider('0x[0-9A-Fa-f]+') then
num = tonumber(considered:sub(3), 16)
@ -226,7 +226,7 @@ end
function Expression:lex(str)
local tokens = {}
err = self:lex1(str, tokens)
local err = self:lex1(str, tokens)
if err then return tokens, err end
err = self:lex2(tokens)
return tokens, err