Ejemplo n.º 1
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');
		}
Ejemplo n.º 2
0
		public virtual void Dispose()
		{
			reader.Close();
			reader = null;
			errors = null;
			lastToken = curToken = peekToken = null;
			specialCommentHash = null;
			sb = originalValue = null;
		}
Ejemplo n.º 3
0
		void CheckPeek(LATextReader reader, int num1, char char2)
		{
			Assert.AreEqual((int)char2, reader.Peek(num1));
		}
Ejemplo n.º 4
0
 public VBLexer(TextReader reader)
 {
     this.reader = new LATextReader(reader);
     ef = new ExpressionFinder();
 }