コード例 #1
0
 public Body(List <Statement> statements, Ownership <COOPFunction> ownership, Modifiers modifiers, Parameters parameters)
 {
     block           = new Block(ownership, new VariableInformation(Ownership <Body> .ownership(this)), statements);
     this.ownership  = ownership;
     this.modifiers  = modifiers;
     this.parameters = parameters;
 }
コード例 #2
0
        static IncludedClasses()
        {
            Object = new COOPClass("Object", null);
            String = new COOPClass("String");

            COOPFunction ToString = new COOPFunction(Ownership <COOPClass> .ownership(Object), String, "ToString");
        }
コード例 #3
0
        public BodyInstance(Body b, List <COOPObject> objects)
        {
            this.b = b;
            variableInformation = new VariableInformation(Ownership <Body> .ownership(b));
            int index = 0;

            foreach (VarDefinition varDefinition in b.parameters.correctOrder)
            {
                variableInformation.processDeclaration(new InstanceParameterDeclaration(varDefinition.type, varDefinition.name));
                variableInformation.processAssignment(new InstanceParameterAssignment(varDefinition.name, objects[index++]));
            }
        }