mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 13:49:17 +02:00
don't try to read polar notation when math is disabled
This commit is contained in:
parent
56a6a0b0b4
commit
b4b6d508d1
1 changed files with 2 additions and 0 deletions
2
sexp.c
2
sexp.c
|
@ -3222,10 +3222,12 @@ sexp sexp_read_raw (sexp ctx, sexp in, sexp *shares) {
|
||||||
res = tmp;
|
res = tmp;
|
||||||
} else if ((str[6] == 'i' || str[6] == 'I') && str[7] == 0) {
|
} else if ((str[6] == 'i' || str[6] == 'I') && str[7] == 0) {
|
||||||
res = sexp_make_complex(ctx, SEXP_ZERO, tmp);
|
res = sexp_make_complex(ctx, SEXP_ZERO, tmp);
|
||||||
|
#if SEXP_USE_MATH
|
||||||
} else if (str[6] == '@') {
|
} else if (str[6] == '@') {
|
||||||
res = sexp_substring_cursor(ctx, res, sexp_make_string_cursor(6), SEXP_FALSE);
|
res = sexp_substring_cursor(ctx, res, sexp_make_string_cursor(6), SEXP_FALSE);
|
||||||
res = sexp_open_input_string(ctx, res);
|
res = sexp_open_input_string(ctx, res);
|
||||||
res = sexp_read_polar_tail(ctx, res, tmp);
|
res = sexp_read_polar_tail(ctx, res, tmp);
|
||||||
|
#endif
|
||||||
} else if (str[6] == '+' || str[6] == '-') {
|
} else if (str[6] == '+' || str[6] == '-') {
|
||||||
res = sexp_substring_cursor(ctx, res, sexp_make_string_cursor(6), SEXP_FALSE);
|
res = sexp_substring_cursor(ctx, res, sexp_make_string_cursor(6), SEXP_FALSE);
|
||||||
res = sexp_string_to_number(ctx, res, SEXP_TEN);
|
res = sexp_string_to_number(ctx, res, SEXP_TEN);
|
||||||
|
|
Loading…
Add table
Reference in a new issue