mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-18 00:32:11 +01:00
Add a ~mod* operator
This commit is contained in:
1 parent
e1091ec182
commit
cb7e9e0ce9
5 files changed
+35
-16
No files matched your search
+6
-5
@@ -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.
|
||||
|
||||
Reference in new issue
Block a user