mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-04-27 11:40:45 -07:00
reader: don't treat -. and +. as a number
CLHS section 2.3.1 mandates that all numbers must contain at least
one digit. Fixes #427.
This commit is contained in:
parent
3201b545e1
commit
ba6e6ddde7
1 changed files with 2 additions and 2 deletions
|
|
@ -212,11 +212,11 @@ ecl_parse_number(cl_object str, cl_index start, cl_index end,
|
|||
return OBJNULL;
|
||||
}
|
||||
}
|
||||
if (!some_digit) goto NOT_A_NUMBER;
|
||||
*ep = i;
|
||||
/* If we have reached the end without decimals (for instance
|
||||
* 1., 2, 13., etc) we return an integer */
|
||||
*ep = i;
|
||||
if (decimal < i) {
|
||||
if (!some_digit) goto NOT_A_NUMBER;
|
||||
return make_float(_ecl_big_register_normalize(num),
|
||||
ecl_make_fixnum(decimal - i), 'e', sign);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue