コード例 #1
0
        private OperatorExpressionNode RelationalOperation(string expression)
        {
            OperatorExpressionNode node = null;

            if (Same(expression, Token.TokenType.LessThan))
            {
                node = new LessThanExpressionNode();
            }
            else if (Same(expression, Token.TokenType.GreaterThan))
            {
                node = new GreaterThanExpressionNode();
            }
            else if (Same(expression, Token.TokenType.LessThanOrEqualTo))
            {
                node = new LessThanOrEqualExpressionNode();
            }
            else if (Same(expression, Token.TokenType.GreaterThanOrEqualTo))
            {
                node = new GreaterThanOrEqualExpressionNode();
            }
            else if (Same(expression, Token.TokenType.EqualTo))
            {
                node = new EqualExpressionNode();
            }
            else if (Same(expression, Token.TokenType.NotEqualTo))
            {
                node = new NotEqualExpressionNode();
            }
            return(node);
        }
コード例 #2
0
ファイル: Parser.cs プロジェクト: nikson/msbuild
 private OperatorExpressionNode RelationalOperation(string expression)
 {
     OperatorExpressionNode node = null;
     if (Same(expression, Token.TokenType.LessThan))
     {
         node = new LessThanExpressionNode();
     }
     else if (Same(expression, Token.TokenType.GreaterThan))
     {
         node = new GreaterThanExpressionNode();
     }
     else if (Same(expression, Token.TokenType.LessThanOrEqualTo))
     {
         node = new LessThanOrEqualExpressionNode();
     }
     else if (Same(expression, Token.TokenType.GreaterThanOrEqualTo))
     {
         node = new GreaterThanOrEqualExpressionNode();
     }
     else if (Same(expression, Token.TokenType.EqualTo))
     {
         node = new EqualExpressionNode();
     }
     else if (Same(expression, Token.TokenType.NotEqualTo))
     {
         node = new NotEqualExpressionNode();
     }
     return node;
 }