示例#1
0
        /// <summary>
        /// Returns the type of symbol, assuming parameter is a symbol.
        /// </summary>
        public static SymbolType GetSymbolType(string arg)
        {
            if (Keywords.IsKeyword(arg))
            {
                return(SymbolType.Keyword);
            }
            if (Operators.IsOperator(arg))
            {
                return(SymbolType.Operator);
            }
            if (Types.IsType(arg))
            {
                return(SymbolType.Type);
            }

            throw new InvalidEnumArgumentException("Argument is not a valid symbol");
        }
示例#2
0
 public static bool IsSymbol(string arg)
 {
     return(Keywords.IsKeyword(arg) || Operators.IsOperator(arg) || Types.IsType(arg));
 }
示例#3
0
 public static bool IsType(string arg)
 {
     return(Types.IsType(arg));
 }