projects
/
prosody.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9af339c
)
tools/erlparse: Handle decimal point in numbers.
author
Waqas Hussain
<waqas20@gmail.com>
Sat, 4 Aug 2012 18:55:52 +0000
(23:55 +0500)
committer
Waqas Hussain
<waqas20@gmail.com>
Sat, 4 Aug 2012 18:55:52 +0000
(23:55 +0500)
tools/erlparse.lua
patch
|
blob
|
history
diff --git
a/tools/erlparse.lua
b/tools/erlparse.lua
index 287e45ba2543de7cd72520e35b70e9ff4135c63f..174585d338433d3c9db14a4f722ed4c029e41c68 100644
(file)
--- a/
tools/erlparse.lua
+++ b/
tools/erlparse.lua
@@
-95,6
+95,12
@@
local function readNumber()
while isNumeric(peek()) do
num[#num+1] = read();
end
+ if peek() == "." then
+ num[#num+1] = read();
+ while isNumeric(peek()) do
+ num[#num+1] = read();
+ end
+ end
return tonumber(t_concat(num));
end
local readItem = nil;