Software /
code /
prosody
Diff
tools/erlparse.lua @ 5080:52767b1f057b
tools/erlparse: Handle decimal point in numbers.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Sat, 04 Aug 2012 23:55:52 +0500 |
parent | 5079:2ab99e239d45 |
child | 5776:bd0ff8ae98a8 |
line wrap: on
line diff
--- a/tools/erlparse.lua Sat Aug 04 23:23:49 2012 +0500 +++ b/tools/erlparse.lua Sat Aug 04 23:55:52 2012 +0500 @@ -95,6 +95,12 @@ 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;