Add a ~mod* operator

This commit is contained in:
Nigel Tao committed 2019-11-12 21:30:45 +11:00
1 parent e1091ec182
commit cb7e9e0ce9
5 files changed
+35 -16

No files matched your search

+6 -5
View File
@@ -149,10 +149,6 @@ func opString(x t.ID) string {
}
var opStrings = [...]string{
t.IDXUnaryPlus: "+",
t.IDXUnaryMinus: "-",
t.IDXUnaryNot: "not ",
t.IDXBinaryPlus: " + ",
t.IDXBinaryMinus: " - ",
t.IDXBinaryStar: " * ",
@@ -163,9 +159,10 @@ var opStrings = [...]string{
t.IDXBinaryPipe: " | ",
t.IDXBinaryHat: " ^ ",
t.IDXBinaryPercent: " % ",
t.IDXBinaryTildeModShiftL: " ~mod<< ",
t.IDXBinaryTildeModPlus: " ~mod+ ",
t.IDXBinaryTildeModMinus: " ~mod- ",
t.IDXBinaryTildeModStar: " ~mod* ",
t.IDXBinaryTildeModShiftL: " ~mod<< ",
t.IDXBinaryTildeSatPlus: " ~sat+ ",
t.IDXBinaryTildeSatMinus: " ~sat- ",
t.IDXBinaryNotEq: " <> ",
@@ -185,6 +182,10 @@ var opStrings = [...]string{
t.IDXAssociativeHat: " ^ ",
t.IDXAssociativeAnd: " and ",
t.IDXAssociativeOr: " or ",
t.IDXUnaryPlus: "+",
t.IDXUnaryMinus: "-",
t.IDXUnaryNot: "not ",
}
// Str returns a string form of n.