php8.1: added first class callable syntax (#18)
This commit is contained in:
@@ -1364,6 +1364,9 @@ func (f *formatter) ExprFunctionCall(n *ast.ExprFunctionCall) {
|
||||
if len(n.Args) > 0 {
|
||||
n.SeparatorTkns = f.formatList(n.Args, ',')
|
||||
}
|
||||
if n.EllipsisTkn != nil {
|
||||
n.EllipsisTkn = f.newToken(token.T_ELLIPSIS, []byte("..."))
|
||||
}
|
||||
n.CloseParenthesisTkn = f.newToken(')', []byte(")"))
|
||||
}
|
||||
|
||||
@@ -1424,6 +1427,9 @@ func (f *formatter) ExprMethodCall(n *ast.ExprMethodCall) {
|
||||
if len(n.Args) > 0 {
|
||||
n.SeparatorTkns = f.formatList(n.Args, ',')
|
||||
}
|
||||
if n.EllipsisTkn != nil {
|
||||
n.EllipsisTkn = f.newToken(token.T_ELLIPSIS, []byte("..."))
|
||||
}
|
||||
n.CloseParenthesisTkn = f.newToken(')', []byte(")"))
|
||||
}
|
||||
|
||||
@@ -1448,6 +1454,9 @@ func (f *formatter) ExprNullsafeMethodCall(n *ast.ExprNullsafeMethodCall) {
|
||||
if len(n.Args) > 0 {
|
||||
n.SeparatorTkns = f.formatList(n.Args, ',')
|
||||
}
|
||||
if n.EllipsisTkn != nil {
|
||||
n.EllipsisTkn = f.newToken(token.T_ELLIPSIS, []byte("..."))
|
||||
}
|
||||
n.CloseParenthesisTkn = f.newToken(')', []byte(")"))
|
||||
}
|
||||
|
||||
@@ -1569,6 +1578,9 @@ func (f *formatter) ExprStaticCall(n *ast.ExprStaticCall) {
|
||||
if len(n.Args) > 0 {
|
||||
n.SeparatorTkns = f.formatList(n.Args, ',')
|
||||
}
|
||||
if n.EllipsisTkn != nil {
|
||||
n.EllipsisTkn = f.newToken(token.T_ELLIPSIS, []byte("..."))
|
||||
}
|
||||
n.CloseParenthesisTkn = f.newToken(')', []byte(")"))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user