mirror of
https://github.com/google/go-jsonnet.git
synced 2025-08-08 07:17:12 +02:00
support for traversing AST tree with parens and objectcomps
This commit is contained in:
parent
46256581d7
commit
a1964b49f1
@ -263,7 +263,7 @@ func specialChildren(node ast.Node) []ast.Node {
|
||||
case *ast.ArrayComp:
|
||||
return []ast.Node{node.Body}
|
||||
case *ast.ObjectComp:
|
||||
|
||||
return inObjectFieldsChildren(node.Fields)
|
||||
case *ast.Self:
|
||||
return nil
|
||||
case *ast.SuperIndex:
|
||||
@ -274,6 +274,8 @@ func specialChildren(node ast.Node) []ast.Node {
|
||||
return nil
|
||||
case *ast.Var:
|
||||
return nil
|
||||
case *ast.Parens:
|
||||
return nil
|
||||
}
|
||||
panic(fmt.Sprintf("specialChildren: Unknown node %#v", node))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user