Esempio n. 1
0
        public virtual Expr Visit(AccessorCallExpr e)
        {
            var lV = VisitExpr(e.Left);
            var aV = Visit(e.Arguments);

            return(lV == e.Left && aV == e.Arguments ? e : new AccessorCallExpr(e.Location, lV, aV, e.IsStatement));
        }
Esempio n. 2
0
            internal protected AccessorCallFrame(EvalVisitor visitor, AccessorCallExpr e)
                : base(visitor, e)
            {
                var declaredFunc = Expr.DeclaredFunctions;

                if (declaredFunc != null)
                {
                    foreach (var df in declaredFunc)
                    {
                        Visitor.ScopeManager.Register(df);
                    }
                }
            }
Esempio n. 3
0
 public IAccessorFrameInitializer OnIndex(Func <IAccessorFrame, RuntimeObj, PExpr> code)
 {
     if (_state == null)
     {
         AccessorCallExpr c = _current?.Expr as AccessorCallExpr;
         if (c != null && c.IsIndexer && c.Arguments.Count == 1)
         {
             _state = new FrameState(_current, code, null, c.Arguments);
         }
         _current = _frame;
     }
     return(this);
 }
Esempio n. 4
0
            public override PExpr Visit(IAccessorFrame frame)
            {
                AccessorCallExpr cE = frame.Expr as AccessorCallExpr;

                if (cE != null)
                {
                    var s = frame.GetCallState(cE.Arguments, DoCall);
                    if (s != null)
                    {
                        return(s.Visit());
                    }
                }
                return(frame.SetError());
            }
Esempio n. 5
0
 public PExpr Visit(AccessorCallExpr e) => Run(new AccessorCallFrame(this, e));
 public PExpr Visit(AccessorCallExpr e)
 {
     return(Run(new AccessorFrame(this, e)));
 }