()
| 83 | } |
| 84 | |
| 85 | func (ps *State) Destroy() { |
| 86 | if ps.AST != nil && ps.AST.This != nil { |
| 87 | ps.AST.DeleteChildren() |
| 88 | } |
| 89 | ps.AST = nil |
| 90 | ps.ClearAST() |
| 91 | ps.Syms.Reset() |
| 92 | ps.Scopes.Reset() |
| 93 | ps.Stack.Reset() |
| 94 | if ps.Src != nil { |
| 95 | ps.Pos, _ = ps.Src.ValidTokenPos(lexer.PosZero) |
| 96 | } |
| 97 | ps.Errs.Reset() |
| 98 | ps.Trace.Init() |
| 99 | } |
| 100 | |
| 101 | // AllocRules allocate the match, nonmatch rule state in correspondence with the src state |
| 102 | func (ps *State) AllocRules() { |
nothing calls this directly
no test coverage detected