Node represents either a Stmt or an Expr. It contains the minimum set of methods that they must both implement. In practice it is not used especially often since we usually know which kind of node we want.
| 44 | // methods that they must both implement. In practice it is not used especially |
| 45 | // often since we usually know which kind of node we want. |
| 46 | type Node interface { |
| 47 | //fmt.Stringer // already provided by pgraph.Vertex |
| 48 | pgraph.Vertex // must implement this since we store these in our graphs |
| 49 | |
| 50 | // Apply is a general purpose iterator method that operates on any node. |
| 51 | Apply(fn func(Node) error) error |
| 52 | |
| 53 | //Parent() Node // TODO: should we implement this? |
| 54 | } |
| 55 | |
| 56 | // Stmt represents a statement node in the language. A stmt could be a resource, |
| 57 | // a `bind` statement, or even an `if` statement. (Different from an `if` |
no outgoing calls
no test coverage detected