IDs returns the set of AST node IDs, including macro calls.
()
| 164 | |
| 165 | // IDs returns the set of AST node IDs, including macro calls. |
| 166 | func (a *AST) IDs() map[int64]bool { |
| 167 | visitor := make(idVisitor) |
| 168 | PostOrderVisit(a.Expr(), visitor) |
| 169 | for _, call := range a.SourceInfo().MacroCalls() { |
| 170 | PostOrderVisit(call, visitor) |
| 171 | } |
| 172 | return visitor |
| 173 | } |
| 174 | |
| 175 | // NodeCount returns the total number of expression nodes in the AST, including macro calls. |
| 176 | func NodeCount(a *AST) int { |
no test coverage detected