示例#1
0
        private void CreateAndAppendExpression(ref Expression parent, Token token)
        {
            if (IsWaste(token))
            {
                return;
            }
            if (parent != null &&
                (token.TokenType == TokenType.Comma || token.TokenType == TokenType.SemiColon))
            {
                parent = parent.PrepareForNextChild();
                return;
            }
            if (_negateNextExpression)
            {
                token.Negate();
                _negateNextExpression = false;
            }
            var expression = _expressionFactory.Create(token);

            if (parent == null)
            {
                _graph.Add(expression);
            }
            else
            {
                parent.AddChild(expression);
            }
        }
示例#2
0
 private void CreateAndAppendExpression(ref Expression parent, Token token)
 {
     if (IsWaste(token)) return;
     if (parent != null && 
         (token.TokenType == TokenType.Comma || token.TokenType == TokenType.SemiColon))
     {
         parent = parent.PrepareForNextChild();
         return;
     }
     if (_negateNextExpression)
     {
         token.Negate();
         _negateNextExpression = false;
     }
     var expression = _expressionFactory.Create(token);
     if (parent == null)
     {
         _graph.Add(expression);
     }
     else
     {
         parent.AddChild(expression);
     }
 }
 public override Expression PrepareForNextChild()
 {
     return(_function.PrepareForNextChild());
 }