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 | // ClearUnusedIDs removes IDs not used in the AST or macro calls from SourceInfo. |
| 176 | func (a *AST) ClearUnusedIDs() { |
no test coverage detected