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; }
static IncludedClasses() { Object = new COOPClass("Object", null); String = new COOPClass("String"); COOPFunction ToString = new COOPFunction(Ownership <COOPClass> .ownership(Object), String, "ToString"); }
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++])); } }