コード例 #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 IsOperator(string arg)
 {
     return(Operators.IsOperator(arg));
 }