The list operator '<<' (append) and '>>' (prepend) have been replaced

with the new operators '<+' and '+>' respectively.
'<<' and '>>' are now used only for left and right binary shit
respectively. Further, their priority has been increased moving them to
a higher priority than that of the assignment operator.
This commit is contained in:
2024-12-28 09:17:27 +01:00
parent cca3b76baa
commit d91e7eb979
8 changed files with 129 additions and 40 deletions
+3 -3
View File
@@ -11,7 +11,7 @@ func newBinNotTerm(tk *Token) (inst *term) {
tk: *tk,
children: make([]*term, 0, 1),
position: posPrefix,
priority: priBinary,
priority: priBinNot,
evalFunc: evalBinaryNot,
}
}
@@ -39,7 +39,7 @@ func newBinAndTerm(tk *Token) (inst *term) {
tk: *tk,
children: make([]*term, 0, 2),
position: posInfix,
priority: priBinary,
priority: priBinAnd,
evalFunc: evalBinaryAnd,
}
}
@@ -71,7 +71,7 @@ func newBinOrTerm(tk *Token) (inst *term) {
tk: *tk,
children: make([]*term, 0, 2),
position: posInfix,
priority: priBinary,
priority: priBinOr,
evalFunc: evalBinaryOr,
}
}