public static bool IsTermOperation(TokenType type) { return new HashSet<TokenType> { TokenType.Multiply, TokenType.Divide, TokenType.Modulo }.Contains(type); }