コード例 #1
0
        public override Var Parse(Scope scope)
        {
            if (_op == null)
            {
                return(_var.Set(scope, _value.Parse(scope)));
            }
            Var left = _var.Get(scope);
            Var val  = _value.Parse(scope);

            val = _op.Parse(left, val);
            return(_var.Set(scope, val));
        }
コード例 #2
0
        public override Var Parse(Scope scope)
        {
            Scope   hackedScope = new Scope();
            VarList argList     = new VarList();

            hackedScope.Variables         = argList;
            argList.StringVars["_parent"] = scope.Variables;
            argList.Meta = GetHackMeta();
            int index = 0;

            foreach (var t in _arguments)
            {
                index = t.AppendArguments(argList, index, hackedScope);
            }
            Var callVar = _caller.Parse(scope);

            if (callVar == null)
            {
                return(null);
            }

            CallData callData = new CallData
            {
                NumArgs = argList.DoubleVars,
                StrArgs = argList.StringVars,
                VarArgs = argList.OtherVars
            };

            return(callVar.Call(callData));
        }
コード例 #3
0
 public override int AppendArguments(VarList argumentList, int index, Scope scope)
 {
     argumentList.DoubleVars[index] = _heldExp.Parse(scope);
     return(index + 1);
 }
コード例 #4
0
 public override Var Parse(Scope scope)
 {
     return(_realExpression.Parse(scope));
 }