Esempio n. 1
0
		private Token _Consume(TokenKind kind)
		{
			Token old = _Current;
			_Current = _Lexer.Next();

			if (old.TokenKind != kind)
				throw new ParseException("意外的 Token:" + _Current.TokenKind.ToString() + "。未找到:" + kind, _Current.Line, _Current.Col);

			return old;
		}
Esempio n. 2
0
		private Token _Consume()
		{
			Token old = _Current;
			_Current = _Lexer.Next();
			return old;
		}