Exemplo n.º 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));
 }
Exemplo n.º 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));
 }