aboutsummaryrefslogtreecommitdiff
path: root/src/parse
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-08-26 14:58:51 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-08-26 14:58:51 -0400
commitcb1d36c6d8bc84f3422c71ab3eb29606e80f7837 (patch)
tree0c4c56effdcf258e9807f8d0257d6e445598b70f /src/parse
parentd25d5642392f93623d1eb4d11156d293fe6df546 (diff)
Formatting for reductions
Diffstat (limited to 'src/parse')
-rw-r--r--src/parse/expressions.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/parse/expressions.c b/src/parse/expressions.c
index 6104b2d2..32133fe9 100644
--- a/src/parse/expressions.c
+++ b/src/parse/expressions.c
@@ -49,7 +49,9 @@ ast_t *parse_reduction(parse_ctx_t *ctx, const char *pos) {
ast_e op = match_binary_operator(&pos);
if (op == Unknown) return NULL;
- ast_t *key = NewAST(ctx->file, pos, pos, Var, .name = "$");
+ const char *op_str = binop_operator(op);
+ assert(op_str);
+ ast_t *key = NewAST(ctx->file, pos, pos, Var, .name = op_str);
for (bool progress = true; progress;) {
ast_t *new_term;
progress =