php8.1: added intersection types support (#29)
This commit is contained in:
@@ -237,6 +237,12 @@ func (f *formatter) Union(n *ast.Union) {
|
||||
}
|
||||
}
|
||||
|
||||
func (f *formatter) Intersection(n *ast.Intersection) {
|
||||
if len(n.Types) > 0 {
|
||||
n.SeparatorTkns = f.formatList(n.Types, '&')
|
||||
}
|
||||
}
|
||||
|
||||
func (f *formatter) Attribute(n *ast.Attribute) {
|
||||
n.Name.Accept(f)
|
||||
n.OpenParenthesisTkn = f.newToken('(', []byte("("))
|
||||
|
||||
Reference in New Issue
Block a user