Node is the abstract type that every AST node implements. This is a closed interface, so it cannot be implemented from outside of this package.
| 12 | // This is a closed interface, so it cannot be implemented from outside of |
| 13 | // this package. |
| 14 | type Node interface { |
| 15 | // This is the mechanism by which the public-facing walk functions |
| 16 | // are implemented. Implementations should call the given function |
| 17 | // for each child node and then replace that node with its return value. |
| 18 | // The return value might just be the same node, for non-transforming |
| 19 | // walks. |
| 20 | walkChildNodes(w internalWalkFunc) |
| 21 | |
| 22 | Range() hcl.Range |
| 23 | } |
| 24 | |
| 25 | type internalWalkFunc func(Node) |
no outgoing calls
no test coverage detected