summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2025-04-04 19:58:08 -0700
committerKaz Kylheku <kaz@kylheku.com>2025-04-04 19:58:08 -0700
commit57cbd9fe4fc8ff17a806151ae996cd39268e7587 (patch)
tree2083320e2be7c9cc329eeb56a829af46632673e7
parent1ad4f163c343f70615cf556d6be936364b556a13 (diff)
downloadtxr-57cbd9fe4fc8ff17a806151ae996cd39268e7587.tar.gz
txr-57cbd9fe4fc8ff17a806151ae996cd39268e7587.tar.bz2
txr-57cbd9fe4fc8ff17a806151ae996cd39268e7587.zip
infix: adjust operator expected diagnostic.
* stdlib/infix.tl (parse-infix): The operator expected diagnostic can occur not just before an an operand, but before an prefix operator. For instance "a cos b". An operator is expected between a and cos. We don't want to say "before operand cos" because cos is an operator.
-rw-r--r--stdlib/infix.tl2
1 files changed, 1 insertions, 1 deletions
diff --git a/stdlib/infix.tl b/stdlib/infix.tl
index 31712a10..73b4caf4 100644
--- a/stdlib/infix.tl
+++ b/stdlib/infix.tl
@@ -140,7 +140,7 @@
((@tok . @rest)
(if (or (not ucheck)
(eq (first opstack).?arity :postfix))
- (infix-error oexp "operator expected before operand ~s" tok))
+ (infix-error oexp "operator expected before ~s" tok))
(push tok nodestack)
(set ucheck nil
exp rest)))