diff --git a/slpp.py b/slpp.py index 3286e2a..9abe39e 100644 --- a/slpp.py +++ b/slpp.py @@ -145,7 +145,7 @@ def value(self): self.next_chr() if self.ch in ['"', "'", '[']: return self.string(self.ch) - if self.ch.isdigit() or self.ch == '-': + if self.ch.isdigit() or self.ch == '-' or self.ch == '.': return self.number() return self.word() @@ -242,6 +242,8 @@ def next_digit(err): raise ParseError(err) return n n = '' + if self.ch == '.': + n += '0' try: if self.ch == '-': n += next_digit(ERRORS['mfnumber_minus'])