NodeCount returns the total number of expression nodes in the AST, including macro calls.
(a *AST)
| 174 | |
| 175 | // NodeCount returns the total number of expression nodes in the AST, including macro calls. |
| 176 | func NodeCount(a *AST) int { |
| 177 | if a == nil { |
| 178 | return 0 |
| 179 | } |
| 180 | return len(a.IDs()) |
| 181 | } |
| 182 | |
| 183 | // ClearUnusedIDs removes IDs not used in the AST or macro calls from SourceInfo. |
| 184 | func (a *AST) ClearUnusedIDs() { |