public INode Parse(ITokenEnumerator input, bool autoDisposing) { if (input == null) { throw new ArgumentNullException(nameof(input)); } if (OnParsePrepare() == false) { return(null); } Stack <int> tempstack = new Stack <int>(); Stack <INode> tempnodes = new Stack <INode>(); m_handler.Reset(); input.MoveNext(); INode result = OnParse(input, tempstack, tempnodes); tempstack.Clear(); tempnodes.Clear(); if (autoDisposing) { input.Dispose(); } OnParseCleanup(m_handler.FailCount > 0); return(result); }
protected virtual void Dispose(bool disposing) { if (source != null) { source.Dispose(); source = null; } current = null; }