aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2012-08-04 23:55:52 +0500
committerWaqas Hussain <waqas20@gmail.com>2012-08-04 23:55:52 +0500
commit6ae2292381995460166fe1b1f47bdabbad1d04fe (patch)
treefd8c17ca67b25d9c53db211a51d299909cffccfd /tools
parentd69fd55cf67321b7d42df1d256c400d900212799 (diff)
downloadprosody-6ae2292381995460166fe1b1f47bdabbad1d04fe.tar.gz
prosody-6ae2292381995460166fe1b1f47bdabbad1d04fe.zip
tools/erlparse: Handle decimal point in numbers.
Diffstat (limited to 'tools')
-rw-r--r--tools/erlparse.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/erlparse.lua b/tools/erlparse.lua
index 287e45ba..174585d3 100644
--- 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;