replace meta.DecToken and meta.IncToken

This commit is contained in:
z7zmey
2018-10-26 12:11:37 +03:00
parent fb8ec01280
commit 7995d41139
6 changed files with 10 additions and 12 deletions

View File

@@ -1473,7 +1473,6 @@ func (p *Printer) printExprPreDec(n node.Node) {
nn := n.(*expr.PreDec)
p.printMeta(nn, meta.NodeStart)
p.printMeta(nn, meta.DecToken)
io.WriteString(p.w, "--")
p.Print(nn.Variable)
@@ -1484,7 +1483,6 @@ func (p *Printer) printExprPreInc(n node.Node) {
nn := n.(*expr.PreInc)
p.printMeta(nn, meta.NodeStart)
p.printMeta(nn, meta.IncToken)
io.WriteString(p.w, "++")
p.Print(nn.Variable)

View File

@@ -3963,7 +3963,7 @@ func TestPrinterPrintPreDec(t *testing.T) {
&meta.Data{
Type: meta.WhiteSpaceType,
Value: " ",
TokenName: meta.DecToken,
TokenName: meta.NodeStart,
},
},
Variable: &expr.Variable{
@@ -3995,7 +3995,7 @@ func TestPrinterPrintPreInc(t *testing.T) {
&meta.Data{
Type: meta.WhiteSpaceType,
Value: " ",
TokenName: meta.IncToken,
TokenName: meta.NodeStart,
},
},
Variable: &expr.Variable{