[refactoring] update ast structure of "Parameter", "Class", "FunctionCall", "MethodCall", "New" and "StaticCall" nodes
This commit is contained in:
@@ -64,10 +64,6 @@ func (p *PrettyPrinter) printNode(n ast.Vertex) {
|
||||
p.printNodeRoot(n)
|
||||
case *ast.Identifier:
|
||||
p.printNodeIdentifier(n)
|
||||
case *ast.Reference:
|
||||
p.printNodeReference(n)
|
||||
case *ast.Variadic:
|
||||
p.printNodeVariadic(n)
|
||||
case *ast.Parameter:
|
||||
p.printNodeParameter(n)
|
||||
case *ast.Nullable:
|
||||
@@ -421,20 +417,6 @@ func (p *PrettyPrinter) printNodeIdentifier(n ast.Vertex) {
|
||||
io.WriteString(p.w, v)
|
||||
}
|
||||
|
||||
func (p *PrettyPrinter) printNodeReference(n ast.Vertex) {
|
||||
nn := n.(*ast.Reference)
|
||||
|
||||
io.WriteString(p.w, "&")
|
||||
p.Print(nn.Var)
|
||||
}
|
||||
|
||||
func (p *PrettyPrinter) printNodeVariadic(n ast.Vertex) {
|
||||
nn := n.(*ast.Variadic)
|
||||
|
||||
io.WriteString(p.w, "...")
|
||||
p.Print(nn.Var)
|
||||
}
|
||||
|
||||
func (p *PrettyPrinter) printNodeParameter(n ast.Vertex) {
|
||||
nn := n.(*ast.Parameter)
|
||||
|
||||
|
||||
@@ -149,10 +149,6 @@ func (p *Printer) printNode(n ast.Vertex) {
|
||||
p.printNodeRoot(n)
|
||||
case *ast.Identifier:
|
||||
p.printNodeIdentifier(n)
|
||||
case *ast.Reference:
|
||||
p.printNodeReference(n)
|
||||
case *ast.Variadic:
|
||||
p.printNodeVariadic(n)
|
||||
case *ast.Parameter:
|
||||
p.printNodeParameter(n)
|
||||
case *ast.Nullable:
|
||||
@@ -505,26 +501,6 @@ func (p *Printer) printNodeIdentifier(n ast.Vertex) {
|
||||
p.printFreeFloating(nn, token.End)
|
||||
}
|
||||
|
||||
func (p *Printer) printNodeReference(n ast.Vertex) {
|
||||
nn := n.(*ast.Reference)
|
||||
p.printFreeFloating(nn, token.Start)
|
||||
|
||||
p.write([]byte("&"))
|
||||
p.Print(nn.Var)
|
||||
|
||||
p.printFreeFloating(nn, token.End)
|
||||
}
|
||||
|
||||
func (p *Printer) printNodeVariadic(n ast.Vertex) {
|
||||
nn := n.(*ast.Variadic)
|
||||
p.printFreeFloating(nn, token.Start)
|
||||
|
||||
p.write([]byte("..."))
|
||||
p.Print(nn.Var)
|
||||
|
||||
p.printFreeFloating(nn, token.End)
|
||||
}
|
||||
|
||||
func (p *Printer) printNodeParameter(n ast.Vertex) {
|
||||
nn := n.(*ast.Parameter)
|
||||
p.printFreeFloating(nn, token.Start)
|
||||
|
||||
Reference in New Issue
Block a user