remove meta.ForeachToken

This commit is contained in:
z7zmey
2018-10-29 12:57:15 +02:00
parent 5d4b592a8b
commit 1c7b4cf398
8 changed files with 12 additions and 15 deletions

View File

@@ -1753,7 +1753,6 @@ func (p *Printer) printStmtAltForeach(n node.Node) {
nn := n.(*stmt.AltForeach)
p.printMeta(nn, meta.NodeStart)
p.printMeta(nn, meta.ForeachToken)
io.WriteString(p.w, "foreach")
p.printMeta(nn, meta.OpenParenthesisToken)
io.WriteString(p.w, "(")
@@ -2217,7 +2216,6 @@ func (p *Printer) printStmtForeach(n node.Node) {
nn := n.(*stmt.Foreach)
p.printMeta(nn, meta.NodeStart)
p.printMeta(nn, meta.ForeachToken)
io.WriteString(p.w, "foreach")
p.printMeta(nn, meta.OpenParenthesisToken)
io.WriteString(p.w, "(")

View File

@@ -5054,7 +5054,7 @@ func TestPrinterPrintAltForeach(t *testing.T) {
&meta.Data{
Type: meta.WhiteSpaceType,
Value: " ",
TokenName: meta.ForeachToken,
TokenName: meta.NodeStart,
},
&meta.Data{
Type: meta.WhiteSpaceType,
@@ -6874,7 +6874,7 @@ func TestPrinterPrintStmtForeach(t *testing.T) {
&meta.Data{
Type: meta.WhiteSpaceType,
Value: " ",
TokenName: meta.ForeachToken,
TokenName: meta.NodeStart,
},
&meta.Data{
Type: meta.WhiteSpaceType,