Ejemplo n.º 1
0
        public ProcedureDivision(Compiler.Nodes.FunctionDeclaration declaration, List<Compiler.Nodes.Node> sentences)
            : base(null)
        {
            table = declaration.SymbolTable;
            UsingParameters = new List<CallTargetParameter>();
            // TCRFUN_CODEGEN_PARAMETERS_ORDER
            foreach(var parameter in declaration.Profile.InputParameters)
            if (parameter.LevelNumber.Value == 1)
                UsingParameters.Add(new GeneratedParameter(parameter.DataName));
            foreach(var parameter in declaration.Profile.InoutParameters)
            if (parameter.LevelNumber.Value == 1)
                UsingParameters.Add(new GeneratedParameter(parameter.DataName));
            foreach(var parameter in declaration.Profile.OutputParameters)
            if (parameter.LevelNumber.Value == 1)
                UsingParameters.Add(new GeneratedParameter(parameter.DataName));
            // TCRFUN_CODEGEN_RETURNING_PARAMETER
            if (declaration.Profile.ReturningParameter != null)
            if (declaration.Profile.ReturningParameter.LevelNumber.Value == 1)
                ReturningParameter = new CallTargetParameter() { StorageArea = GeneratedParameter.CreateReceivingStorageArea(declaration.Profile.ReturningParameter.DataName) };

            this.children.AddRange(sentences);
        }
 private static CallTargetParameter CreateCallTargetParameter(ParameterDescriptionEntry param)
 {
     var symbolReference = new SymbolReference(param.DataName);
     var storageArea = new DataOrConditionStorageArea(symbolReference);
     var callParameter = new CallTargetParameter { StorageArea = storageArea };
     return callParameter;
 }
Ejemplo n.º 3
0
 public virtual bool Visit(CallTargetParameter callTargetParameter)
 {
     return(true);
 }