[refactoring] update ast structure of "ArrayDimFetch" and "ArrayItem" nodes
This commit is contained in:
@@ -953,8 +953,12 @@ func (n *ExprArray) Accept(v NodeVisitor) {
|
||||
// ExprArrayDimFetch node
|
||||
type ExprArrayDimFetch struct {
|
||||
Node
|
||||
Var Vertex
|
||||
Dim Vertex
|
||||
Var Vertex
|
||||
OpenCurlyBracketTkn *token.Token
|
||||
OpenBracketTkn *token.Token
|
||||
Dim Vertex
|
||||
CloseBracketTkn *token.Token
|
||||
CloseCurlyBracketTkn *token.Token
|
||||
}
|
||||
|
||||
func (n *ExprArrayDimFetch) Accept(v NodeVisitor) {
|
||||
@@ -964,9 +968,10 @@ func (n *ExprArrayDimFetch) Accept(v NodeVisitor) {
|
||||
// ExprArrayItem node
|
||||
type ExprArrayItem struct {
|
||||
Node
|
||||
Unpack bool
|
||||
Key Vertex
|
||||
Val Vertex
|
||||
EllipsisTkn *token.Token
|
||||
Key Vertex
|
||||
DoubleArrowTkn *token.Token
|
||||
Val Vertex
|
||||
}
|
||||
|
||||
func (n *ExprArrayItem) Accept(v NodeVisitor) {
|
||||
|
||||
@@ -620,11 +620,6 @@ func (v *Dump) ExprArrayItem(n *ast.ExprArrayItem) {
|
||||
v.printIndentIfNotSingle(v.indent - 1)
|
||||
v.print("&ast.ExprArrayItem{\n")
|
||||
v.printNode(n.GetNode())
|
||||
|
||||
if n.Unpack {
|
||||
v.printIndent(v.indent)
|
||||
v.print("Unpack: true,\n")
|
||||
}
|
||||
}
|
||||
|
||||
func (v *Dump) ExprArrowFunction(n *ast.ExprArrowFunction) {
|
||||
|
||||
Reference in New Issue
Block a user