remove meta.StaticToken

This commit is contained in:
z7zmey
2018-10-25 14:29:27 +03:00
parent 58f706fa0d
commit 221129e959
8 changed files with 16 additions and 21 deletions

View File

@@ -1243,7 +1243,6 @@ func (p *Printer) printExprClosure(n node.Node) {
p.printMeta(nn, meta.NodeStart)
if nn.Static {
p.printMeta(nn, meta.StaticToken)
io.WriteString(p.w, "static")
}
@@ -2535,12 +2534,9 @@ func (p *Printer) printStmtStaticVar(n node.Node) {
func (p *Printer) printStmtStatic(n node.Node) {
nn := n.(*stmt.Static)
p.printMeta(nn, meta.NodeStart)
p.printMeta(nn, meta.StaticToken)
io.WriteString(p.w, "static")
p.joinPrint(",", nn.Vars)
p.printMeta(nn, meta.SemiColonToken)
p.printMeta(nn, meta.NodeEnd)
}

View File

@@ -3129,7 +3129,7 @@ func TestPrinterPrintExprClosure(t *testing.T) {
&meta.Data{
Type: meta.WhiteSpaceType,
Value: " ",
TokenName: meta.StaticToken,
TokenName: meta.NodeStart,
},
&meta.Data{
Type: meta.WhiteSpaceType,
@@ -7780,7 +7780,7 @@ func TestPrinterPrintStatic(t *testing.T) {
&meta.Data{
Type: meta.WhiteSpaceType,
Value: " ",
TokenName: meta.StaticToken,
TokenName: meta.NodeStart,
},
&meta.Data{
Type: meta.WhiteSpaceType,