Example #1
0
 public FunctionCallNode(FunctionCallNode rhs) : base(rhs)
 {
     Function        = ProtoCore.Utils.NodeUtils.Clone(rhs.Function);
     FormalArguments = new List <ImperativeNode>();
     foreach (ImperativeNode argNode in rhs.FormalArguments)
     {
         ImperativeNode tempNode = ProtoCore.Utils.NodeUtils.Clone(argNode);
         FormalArguments.Add(tempNode);
     }
 }
Example #2
0
        public ImperativeNode BuildFunctionCall(string functionName, List<ImperativeNode> arguments)
        {
            var func = new FunctionCallNode();
            func.Function = BuildIdentfier(functionName);
            func.FormalArguments = arguments;

            return func;
        }
Example #3
0
        protected FunctionCallNode EmitGetterSetterForIdent(IdentifierNode inode, bool isSetter = false)
        {
            if (isSetter)
            {
                FunctionCallNode setter = new FunctionCallNode();
                setter.Function = inode;

                IdentifierNode tmpArg = new IdentifierNode();
                tmpArg.Name = tmpArg.Value = ProtoCore.DSASM.Constants.kTempArg;
                tmpArg.datatype = TypeSystem.BuildPrimitiveTypeObject(PrimitiveType.kTypeVar, false);
                setter.FormalArguments.Add(tmpArg);

                return setter;
            }
            else
            {
                FunctionCallNode getter = new FunctionCallNode();
                getter.Function = inode;
                return getter;
            }
        }
Example #4
0
 public FunctionCallNode(FunctionCallNode rhs)
     : base(rhs)
 {
     Function = ProtoCore.Utils.NodeUtils.Clone(rhs.Function);
     FormalArguments = new List<ImperativeNode>();
     foreach (ImperativeNode argNode in rhs.FormalArguments)
     {
         ImperativeNode tempNode = ProtoCore.Utils.NodeUtils.Clone(argNode);
         FormalArguments.Add(tempNode);
     }
 }