예제 #1
0
 public virtual void Dispose()
 {
     reader.Close();
     reader             = null;
     errors             = null;
     lastToken          = curToken = peekToken = null;
     specialCommentHash = null;
     tagComments        = null;
     sb = originalValue = null;
 }
예제 #2
0
		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');
		}
예제 #3
0
		void CheckPeek(LATextReader reader, int num1, char char2)
		{
			Assert.AreEqual((int)char2, reader.Peek(num1));
		}
예제 #4
0
 /// <summary>
 /// Constructor for the abstract lexer class.
 /// </summary>
 protected AbstractLexer(TextReader reader)
 {
     this.reader = new LATextReader(reader);
 }
예제 #5
0
		public virtual void Dispose()
		{
			reader.Close();
			reader = null;
			errors = null;
			lastToken = curToken = peekToken = null;
			specialCommentHash = null;
			tagComments = null;
			sb = originalValue = null;
		}
예제 #6
0
		/// <summary>
		/// Constructor for the abstract lexer class.
		/// </summary>
		protected AbstractLexer(TextReader reader)
		{
			this.reader = new LATextReader(reader);
		}