Fix parsing bug for numbers.

This commit is contained in:
Calvin Rose 2019-01-17 12:32:51 -05:00
parent 2c1b506213
commit 63137b8107
1 changed files with 1 additions and 1 deletions

View File

@ -294,7 +294,7 @@ static int tokenchar(JanetParser *p, JanetParseState *state, uint8_t c) {
/* Token finished */
blen = (int32_t) p->bufcount;
int start_dig = p->buf[0] >= '0' && p->buf[0] <= '9';
int start_num = start_dig || p->buf[0] == '-' || p->buf[0] == '+';
int start_num = start_dig || p->buf[0] == '-' || p->buf[0] == '+' || p->buf[0] == '.';
if (p->buf[0] == ':') {
ret = janet_keywordv(p->buf + 1, blen - 1);
} else if (start_num && !janet_scan_number(p->buf, blen, &numval)) {