[refactoring] update ast structure of "array" and "list" nodes
This commit is contained in:
@@ -274,10 +274,6 @@ func (p *PrettyPrinter) printNode(n ast.Vertex) {
|
||||
p.printExprRequireOnce(n)
|
||||
case *ast.ExprShellExec:
|
||||
p.printExprShellExec(n)
|
||||
case *ast.ExprShortArray:
|
||||
p.printExprShortArray(n)
|
||||
case *ast.ExprShortList:
|
||||
p.printExprShortList(n)
|
||||
case *ast.ExprStaticCall:
|
||||
p.printExprStaticCall(n)
|
||||
case *ast.ExprStaticPropertyFetch:
|
||||
@@ -1240,22 +1236,6 @@ func (p *PrettyPrinter) printExprShellExec(n ast.Vertex) {
|
||||
io.WriteString(p.w, "`")
|
||||
}
|
||||
|
||||
func (p *PrettyPrinter) printExprShortArray(n ast.Vertex) {
|
||||
nn := n.(*ast.ExprShortArray)
|
||||
|
||||
io.WriteString(p.w, "[")
|
||||
p.joinPrint(", ", nn.Items)
|
||||
io.WriteString(p.w, "]")
|
||||
}
|
||||
|
||||
func (p *PrettyPrinter) printExprShortList(n ast.Vertex) {
|
||||
nn := n.(*ast.ExprShortList)
|
||||
|
||||
io.WriteString(p.w, "[")
|
||||
p.joinPrint(", ", nn.Items)
|
||||
io.WriteString(p.w, "]")
|
||||
}
|
||||
|
||||
func (p *PrettyPrinter) printExprStaticCall(n ast.Vertex) {
|
||||
nn := n.(*ast.ExprStaticCall)
|
||||
|
||||
|
||||
@@ -363,10 +363,6 @@ func (p *Printer) printNode(n ast.Vertex) {
|
||||
p.printExprRequireOnce(n)
|
||||
case *ast.ExprShellExec:
|
||||
p.printExprShellExec(n)
|
||||
case *ast.ExprShortArray:
|
||||
p.printExprShortArray(n)
|
||||
case *ast.ExprShortList:
|
||||
p.printExprShortList(n)
|
||||
case *ast.ExprStaticCall:
|
||||
p.printExprStaticCall(n)
|
||||
case *ast.ExprStaticPropertyFetch:
|
||||
@@ -1837,30 +1833,6 @@ func (p *Printer) printExprShellExec(n ast.Vertex) {
|
||||
p.printFreeFloating(nn, token.End)
|
||||
}
|
||||
|
||||
func (p *Printer) printExprShortArray(n ast.Vertex) {
|
||||
nn := n.(*ast.ExprShortArray)
|
||||
p.printFreeFloating(nn, token.Start)
|
||||
|
||||
p.write([]byte("["))
|
||||
p.joinPrint(",", nn.Items)
|
||||
p.printFreeFloating(nn, token.ArrayPairList)
|
||||
p.write([]byte("]"))
|
||||
|
||||
p.printFreeFloating(nn, token.End)
|
||||
}
|
||||
|
||||
func (p *Printer) printExprShortList(n ast.Vertex) {
|
||||
nn := n.(*ast.ExprShortList)
|
||||
p.printFreeFloating(nn, token.Start)
|
||||
|
||||
p.write([]byte("["))
|
||||
p.joinPrint(",", nn.Items)
|
||||
p.printFreeFloating(nn, token.ArrayPairList)
|
||||
p.write([]byte("]"))
|
||||
|
||||
p.printFreeFloating(nn, token.End)
|
||||
}
|
||||
|
||||
func (p *Printer) printExprStaticCall(n ast.Vertex) {
|
||||
nn := n.(*ast.ExprStaticCall)
|
||||
p.printFreeFloating(nn, token.Start)
|
||||
|
||||
Reference in New Issue
Block a user