public virtual void Dispose() { reader.Close(); reader = null; errors = null; lastToken = curToken = peekToken = null; specialCommentHash = null; tagComments = null; sb = originalValue = null; }
public void TestPeek() { LATextReader reader = new LATextReader(new StringReader("abcd")); CheckPeek(reader, 0, 'a'); CheckPeek(reader, 2, 'c'); CheckPeek(reader, 3, 'd'); CheckPeek(reader, 1, 'b'); CheckPeek(reader, 0, 'a'); Assert.AreEqual((int)'a', reader.Read()); CheckPeek(reader, 1, 'c'); CheckPeek(reader, 2, 'd'); CheckPeek(reader, 0, 'b'); }
void CheckPeek(LATextReader reader, int num1, char char2) { Assert.AreEqual((int)char2, reader.Peek(num1)); }
/// <summary> /// Constructor for the abstract lexer class. /// </summary> protected AbstractLexer(TextReader reader) { this.reader = new LATextReader(reader); }