mirror of
https://github.com/notwa/lips
synced 2024-05-18 16:33:22 -07:00
actually actually fix octal numbers
This commit is contained in:
parent
59c4802ff8
commit
46b1cbea5a
2
lips.lua
2
lips.lua
|
@ -559,7 +559,7 @@ end
|
||||||
|
|
||||||
function Lexer:read_octal()
|
function Lexer:read_octal()
|
||||||
local buff = self:read_chars('[0-7]')
|
local buff = self:read_chars('[0-7]')
|
||||||
local num = tonumber(buff)
|
local num = tonumber(buff, 8)
|
||||||
if not num then self:error('invalid octal number') end
|
if not num then self:error('invalid octal number') end
|
||||||
return num
|
return num
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user