[refactoring] update ast structure of "PostDec", "PostInc", "PreDec", "PreInc" and "New" nodes
This commit is contained in:
@@ -1143,9 +1143,9 @@ func (p *PrettyPrinter) printExprNew(n ast.Vertex) {
|
||||
io.WriteString(p.w, "new ")
|
||||
p.Print(nn.Class)
|
||||
|
||||
if nn.ArgumentList != nil {
|
||||
if nn.Arguments != nil {
|
||||
io.WriteString(p.w, "(")
|
||||
p.joinPrint(", ", nn.ArgumentList.Arguments)
|
||||
p.joinPrint(", ", nn.Arguments)
|
||||
io.WriteString(p.w, ")")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1710,10 +1710,10 @@ func (p *Printer) printExprNew(n ast.Vertex) {
|
||||
p.bufStart = " "
|
||||
p.Print(nn.Class)
|
||||
|
||||
if nn.ArgumentList != nil {
|
||||
p.printFreeFloatingOrDefault(nn.ArgumentList, token.Start, "(")
|
||||
p.joinPrint(",", nn.ArgumentList.Arguments)
|
||||
p.printFreeFloatingOrDefault(nn.ArgumentList, token.End, ")")
|
||||
if nn.Arguments != nil {
|
||||
p.printToken(nn.OpenParenthesisTkn, "(")
|
||||
p.joinPrint(",", nn.Arguments)
|
||||
p.printToken(nn.CloseParenthesisTkn, ")")
|
||||
}
|
||||
|
||||
p.printFreeFloating(nn, token.End)
|
||||
|
||||
Reference in New Issue
Block a user