private void ParseToken(TokenType type, string value) { Token token = this.NextToken(); if (token == null || token.Type != type || token.Value != value) throw new ParserException(string.Format("Expected '{0}'", value)); }