Software /
code /
prosody
Changeset
5080:52767b1f057b
tools/erlparse: Handle decimal point in numbers.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Sat, 04 Aug 2012 23:55:52 +0500 |
parents | 5079:2ab99e239d45 |
children | 5082:1ffc788c5696 |
files | tools/erlparse.lua |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
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;