Example #1
0
 /// <summary>
 /// Gets a placeholder to indicate that a token is expected next in an expression.
 /// </summary>
 /// <param name="tokenName">The type of the token that is expected.</param>
 /// <returns>The token placeholder.</returns>
 public Token Token(string tokenName)
 {
     if (String.IsNullOrWhiteSpace(tokenName) || !tokenRegistry.IsRegistered(tokenName))
     {
         throw new ArgumentException(Resources.UnknownTokenType, "tokenName");
     }
     return(new Token(tokenName));
 }
Example #2
0
 /// <summary>
 /// Gets a placeholder to indicate that a token is expected next in an expression.
 /// </summary>
 /// <param name="tokenName">The type of the token that is expected.</param>
 /// <returns>The token placeholder.</returns>
 public Token Token(string tokenName)
 {
     if (String.IsNullOrWhiteSpace(tokenName) || !tokenRegistry.IsRegistered(tokenName))
     {
         throw new ArgumentException("Encountered an unknown token type.");
     }
     return(new Token(tokenName));
 }