1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 11:50:28 +02:00

Parse Decimal Numbers

* module/language/ecmascript/parse.scm: handle numbers with leading
    decimals correctly.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Noah Lavine 2011-01-11 17:58:34 -05:00 committed by Ludovic Courtès
parent 326298206a
commit 84816b3aae

View file

@ -197,6 +197,7 @@
(StringLiteral) : `(string ,$1)
(RegexpLiteral) : `(regexp ,$1)
(NumericLiteral) : `(number ,$1)
(dot NumericLiteral) : `(number ,(string->number (string-append "." (number->string $2))))
(ArrayLiteral) : $1
(ObjectLiteral) : $1
(lparen Expression rparen) : $2)