(node WalkVariablesNode, spec hcldec.Spec)
| 31 | } |
| 32 | |
| 33 | func walkVariablesWithHCLDec(node WalkVariablesNode, spec hcldec.Spec) []hcl.Traversal { |
| 34 | vars, children := node.Visit(hcldec.ImpliedSchema(spec)) |
| 35 | |
| 36 | if len(children) > 0 { |
| 37 | childSpecs := hcldec.ChildBlockTypes(spec) |
| 38 | for _, child := range children { |
| 39 | if childSpec, exists := childSpecs[child.BlockTypeName]; exists { |
| 40 | vars = append(vars, walkVariablesWithHCLDec(child.Node, childSpec)...) |
| 41 | } |
| 42 | } |
| 43 | } |
| 44 | |
| 45 | return vars |
| 46 | } |
no test coverage detected