Remove the unused &^ AmpHat operator

This commit is contained in:
Nigel Tao committed 2018-04-26 11:24:27 +10:00
1 parent 95815036ba
commit 7f0923a9cf
7 files changed
+33 -51

No files matched your search

-3
View File
@@ -517,7 +517,6 @@ func (g *gen) writeExprBinaryOp(b *buffer, n *a.Expr, rp replacementPolicy, pp p
if err := g.writeExpr(b, n.LHS().Expr(), rp, parenthesesMandatory, depth); err != nil {
return err
}
// TODO: does KeyXBinaryAmpHat need special consideration?
b.writes(opName)
if err := g.writeExpr(b, n.RHS().Expr(), rp, parenthesesMandatory, depth); err != nil {
return err
@@ -681,7 +680,6 @@ var cOpNames = [256]string{
t.IDShiftLEq: " <<= ",
t.IDShiftREq: " >>= ",
t.IDAmpEq: " &= ",
t.IDAmpHatEq: " no_such_C_operator ",
t.IDPipeEq: " |= ",
t.IDHatEq: " ^= ",
t.IDPercentEq: " %= ",
@@ -703,7 +701,6 @@ var cOpNames = [256]string{
t.IDXBinaryShiftL: " << ",
t.IDXBinaryShiftR: " >> ",
t.IDXBinaryAmp: " & ",
t.IDXBinaryAmpHat: " no_such_C_operator ",
t.IDXBinaryPipe: " | ",
t.IDXBinaryHat: " ^ ",
t.IDXBinaryPercent: " % ",
+1 -1
View File
@@ -81,7 +81,7 @@ func (g *gen) writeStatement(b *buffer, n *a.Node, depth uint32) error {
if err := g.writeExpr(b, n.LHS(), replaceCallSuspendibles, parenthesesMandatory, depth); err != nil {
return err
}
// TODO: `~sat+=`, `~sat-=` and `&^=` need special consideration.
// TODO: `~sat+=` and `~sat-=` need special consideration.
op := n.Operator()
opName := cOpNames[0xFF&op]
if opName == "" {