rebirth: Recognize numbers without digit before decimal point

* bootstrap/rebirth.scm (tname-verbatim?): Match numbers that have no digit
    preceding the decimal point, so long as digits follow it.
master
Mike Gerwitz 2018-09-10 23:24:45 -04:00
parent ba93b7c034
commit 84345fab58
Signed by: mikegerwitz
GPG Key ID: 8C917B7F5DC51BA2
1 changed files with 1 additions and 1 deletions

View File

@ -300,7 +300,7 @@
;;
;; This only returns #t for numbers.
(define (tname-verbatim? name)
(es:match (es:regexp "^-?\\d+(\.\\d+)?$") name))
(es:match (es:regexp "^-?(\\d+(\\.\\d+)?|\\.\\d+)$") name))
;; Generate ECMAScript to reference the variable associated with the token T