remove meta.MagicConstantToken

This commit is contained in:
z7zmey
2018-10-25 13:54:42 +03:00
parent 5144644d92
commit 33a935c628
8 changed files with 37 additions and 42 deletions

View File

@@ -608,11 +608,7 @@ func (p *Printer) printScalarHeredoc(n node.Node) {
func (p *Printer) printScalarMagicConstant(n node.Node) {
nn := n.(*scalar.MagicConstant)
p.printMeta(nn, meta.NodeStart)
p.printMeta(nn, meta.MagicConstantToken)
io.WriteString(p.w, nn.Value)
p.printMeta(nn, meta.NodeEnd)
}

View File

@@ -720,7 +720,7 @@ func TestPrinterPrintScalarMagicConstant(t *testing.T) {
&meta.Data{
Type: meta.WhiteSpaceType,
Value: " ",
TokenName: meta.MagicConstantToken,
TokenName: meta.NodeStart,
},
},
Value: "__DIR__",