示例#1
0
 protected BinaryNode(Node leftNode, Node rightNode)
 {
     Debug.Assert(leftNode != null);
     Debug.Assert(rightNode != null);
     this.leftNode = leftNode;
     this.rightNode = rightNode;
 }
示例#2
0
        protected TernaryNode(Node firstNode, Node secondNode, Node thirdNode)
        {
            Debug.Assert(firstNode != null);
            Debug.Assert(secondNode != null);
            Debug.Assert(thirdNode != null);

            this.firstNode = firstNode;
            this.secondNode = secondNode;
            this.thirdNode = thirdNode;
        }
 //private static readonly ExceptionHelper exceptionHelper = new ExceptionHelper(typeof(ConditionalBinaryNode));
 protected ConditionalBinaryNode(Node leftNode, Node rightNode)
     : base(leftNode, rightNode)
 {
 }
示例#4
0
 //private static readonly ExceptionHelper exceptionHelper = new ExceptionHelper(typeof(NegateNode));
 public NegateNode(Node node)
     : base(node)
 {
 }
 //private static readonly ExceptionHelper exceptionHelper = new ExceptionHelper(typeof(TernaryConditionalNode));
 public TernaryConditionalNode(Node firstNode, Node secondNode, Node thirdNode)
     : base(firstNode, secondNode, thirdNode)
 {
 }
示例#6
0
 protected UnaryNode(Node node)
 {
     Debug.Assert(node != null);
     this.node = node;
 }
        // turn the expression into an AST each time it changes (not each time our Convert methods are called)
        private void EnsureExpressionNode()
        {
            if (this.expressionNode != null || string.IsNullOrEmpty(this.expression))
            {
                return;
            }

            using (var stringReader = new StringReader(this.expression))
            using (var tokenizer = new Tokenizer(stringReader))
            using (var parser = new Parser(tokenizer))
            {
                this.expressionNode = parser.ParseExpression();
            }
        }
示例#8
0
 //private static readonly ExceptionHelper exceptionHelper = new ExceptionHelper(typeof(ComplementNode));
 public ComplementNode(Node node)
     : base(node)
 {
 }