aboutsummaryrefslogtreecommitdiff
path: root/parse.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-03-07 12:15:38 -0500
committerBruce Hill <bruce@bruce-hill.com>2024-03-07 12:15:38 -0500
commitfa66053e13c39e6f6a25db8f46b1e1f97ecce2fc (patch)
tree18148dcfa81cac8f156c4fbedbda7edf97c6585c /parse.c
parent98d86d1934cfe379c8dec758d843571bcb0f8486 (diff)
Use '$' for min/max variable
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/parse.c b/parse.c
index 8ed6526f..de33439d 100644
--- a/parse.c
+++ b/parse.c
@@ -738,7 +738,7 @@ PARSER(parse_reduction) {
ast_t *lhs = NewAST(ctx->file, pos, pos, Var, .name="$reduction");
ast_t *rhs = NewAST(ctx->file, pos, pos, Var, .name="$iter_value");
if (op == BINOP_MIN || op == BINOP_MAX) {
- ast_t *key = NewAST(ctx->file, pos, pos, Var, .name=(op == BINOP_MIN ? "_min_" : "_max_"));
+ ast_t *key = NewAST(ctx->file, pos, pos, Var, .name="$");
for (bool progress = true; progress; ) {
ast_t *new_term;
progress = (false
@@ -1302,7 +1302,7 @@ static ast_t *parse_infix_expr(parse_ctx_t *ctx, const char *pos, int min_tightn
for (binop_e op; (op=match_binary_operator(&pos)) != BINOP_UNKNOWN && op_tightness[op] >= min_tightness; spaces(&pos)) {
ast_t *key = NULL;
if (op == BINOP_MIN || op == BINOP_MAX) {
- key = NewAST(ctx->file, pos, pos, Var, .name=op == BINOP_MIN ? "_min_" : "_max_");
+ key = NewAST(ctx->file, pos, pos, Var, .name="$");
for (bool progress = true; progress; ) {
ast_t *new_term;
progress = (false