aboutsummaryrefslogtreecommitdiff
path: root/src/interp/i-output.boot
diff options
context:
space:
mode:
Diffstat (limited to 'src/interp/i-output.boot')
-rw-r--r--src/interp/i-output.boot13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/interp/i-output.boot b/src/interp/i-output.boot
index af86f29e..d734fbc1 100644
--- a/src/interp/i-output.boot
+++ b/src/interp/i-output.boot
@@ -469,8 +469,17 @@ rbrkSch() == symbolName specialChar 'rbrk
lbrkSch() == symbolName specialChar 'lbrk
quadSch() == symbolName specialChar 'quad
-isBinaryInfix x ==
- member(x, '(_= _+ _- _* _/ _*_* _^ "=" "+" "-" "*" "/" "**" "^"))
+++ List of binary operators
+$BinaryOperators ==
+ ["**", "^", "*", "/", "//", "\", "\\", "rem", "quo", "exquo", "+", "-",
+ "/\", "\/", "=", "~=", "<", "<=", ">", ">=", "and", "or", ">>", "<<",
+ "by", "has", "case", "->", "..", "|"]
+
+
+binaryInfix? x ==
+ ident? x => symbolMember?(x,$BinaryOperators)
+ string? x => symbolMember?(makeSymbol x,$BinaryOperators)
+ false
stringApp([.,u],x,y,d) ==
appChar(strconc($DoubleQuote,atom2String u,$DoubleQuote),x,y,d)