[refactoring] update ast structure of "Root" and "Class" nodes
This commit is contained in:
@@ -1450,9 +1450,9 @@ func (p *PrettyPrinter) printStmtClass(n ast.Vertex) {
|
||||
p.Print(nn.ClassName)
|
||||
}
|
||||
|
||||
if nn.ArgumentList != nil {
|
||||
if nn.Arguments != nil {
|
||||
io.WriteString(p.w, "(")
|
||||
p.joinPrint(", ", nn.ArgumentList.(*ast.ArgumentList).Arguments)
|
||||
p.joinPrint(", ", nn.Arguments)
|
||||
io.WriteString(p.w, ")")
|
||||
}
|
||||
|
||||
|
||||
@@ -2067,10 +2067,10 @@ func (p *Printer) printStmtClass(n ast.Vertex) {
|
||||
p.Print(nn.ClassName)
|
||||
}
|
||||
|
||||
if nn.ArgumentList != nil {
|
||||
p.printFreeFloatingOrDefault(nn.ArgumentList, token.Start, "(")
|
||||
p.joinPrint(",", nn.ArgumentList.(*ast.ArgumentList).Arguments)
|
||||
p.printFreeFloatingOrDefault(nn.ArgumentList, token.End, ")")
|
||||
if nn.Arguments != nil {
|
||||
p.printToken(nn.OpenParenthesisTkn, "(")
|
||||
p.joinPrint(",", nn.Arguments)
|
||||
p.printToken(nn.CloseParenthesisTkn, ")")
|
||||
}
|
||||
|
||||
if nn.Extends != nil {
|
||||
|
||||
Reference in New Issue
Block a user