diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2026-01-16 18:22:00 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2026-01-16 18:22:00 -0500 |
| commit | c64fa0d256ffdba8052580001a34da13157672fd (patch) | |
| tree | b7d145d81957d2b30ec37f94ed67d0d5c1d6621f /src/parse | |
| parent | de7c686bd5ae30fe229d1a4e200cbd7b56e3a91c (diff) | |
Fix everything up real good
Diffstat (limited to 'src/parse')
| -rw-r--r-- | src/parse/numbers.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/parse/numbers.c b/src/parse/numbers.c index 5aa5c287..b992b133 100644 --- a/src/parse/numbers.c +++ b/src/parse/numbers.c @@ -100,5 +100,9 @@ ast_t *parse_num(parse_ctx_t *ctx, const char *pos) { if (!Real$is_zero(real)) real = Real$times(Real$divided_by(real, Real$from_float64(360.)), Real$tau); } + if (Real$tag(real) == REAL_TAG_SYMBOLIC && REAL_SYMBOLIC(real)->op == SYM_INVALID) { + parser_err(ctx, start, pos, "Failed to convert this to a real number"); + } + return NewAST(ctx->file, start, pos, Number, .n = real); } |
