Refactor cgen's writeStatement{Assign,Var}

This commit is contained in:
Nigel Tao committed 2018-12-01 22:14:49 +11:00
1 parent 09f857dc47
commit 2936b586cf
3 files changed
+67 -92

No files matched your search

+3 -1
View File
@@ -461,7 +461,6 @@ func cOpName(x t.ID) string {
}
var cOpNames = [...]string{
t.IDEq: " = ",
t.IDPlusEq: " += ",
t.IDMinusEq: " -= ",
t.IDStarEq: " *= ",
@@ -478,6 +477,9 @@ var cOpNames = [...]string{
t.IDTildeSatPlusEq: noSuchCOperator,
t.IDTildeSatMinusEq: noSuchCOperator,
t.IDEq: " = ",
t.IDEqQuestion: " = ",
t.IDXUnaryPlus: " + ",
t.IDXUnaryMinus: " - ",
t.IDXUnaryNot: " ! ",