Ejemplo n.º 1
0
 protected override void BeginVisitNode(AphidExpression expression)
 {
     if (IsMember(expression))
     {
         _object = Ancestors.Peek().ToObject();
         _member = expression.ToBinaryOperator();
         _currentPath.Push(_member.LeftOperand);
     }
     else if (IsArray(expression))
     {
         _array = expression.ToArray();
     }
 }
Ejemplo n.º 2
0
 private bool IsMember(AphidExpression expression) =>
 expression?.Type == AphidExpressionType.BinaryOperatorExpression &&
 Ancestors.Count >= 1 &&
 Ancestors.Peek().Type == AphidExpressionType.ObjectExpression;