public override AstNode Visit(ClassDefinition node) { // Use the generic scope. PseudoScope genScope = node.GetGenericScope(); if(genScope != null) PushScope(genScope); // Process the base structures. ProcessBases(node); // Update the scope. PushScope(node.GetScope()); // Visit his children. VisitList(node.GetChildren()); // Restore the scope. PopScope(); // Pop the generic scope. if(genScope != null) PopScope(); return node; }
public override AstNode Visit(ClassDefinition node) { // Fix the vtable. try { node.GetStructure().FixInheritance(); } catch(ModuleException error) { Error(node, error.Message); } // Create default constructor. CreateDefaultConstructor(node); // Update the scope. PushScope(node.GetScope()); // Visit his children. VisitList(node.GetChildren()); // Restore the scope. PopScope(); return node; }
public override AstNode Visit(ClassDefinition node) { // Process attributes. ProcessAttributes(node); // Update the scope. PushScope(node.GetScope()); // Visit his children. VisitList(node.GetChildren()); // Restore the scope. PopScope(); return node; }
public override AstNode Visit(ClassDefinition node) { // Process attributes. ProcessAttributes(node); // Use the generic scope. PseudoScope genScope = node.GetGenericScope(); if(genScope != null) PushScope(genScope); // Create default constructors. CreateDefaultConstructor(node); CreateDefaultStaticConstructor(node); // Update the scope. PushScope(node.GetScope()); // Visit his children. VisitList(node.GetChildren()); // Restore the scope. PopScope(); // Pop the generic scope. if(genScope != null) PopScope(); return node; }
public override AstNode Visit(ClassDefinition node) { // Process attributes. ProcessAttributes(node); // Use the generic scope. PseudoScope genScope = node.GetGenericScope(); if(genScope != null) PushScope(genScope); // Check default constructor initialization. Method defaultCtor = node.GetDefaultConstructor(); if(defaultCtor != null) CheckDefaultConstructorInit(node, defaultCtor); // Update the scope. PushScope(node.GetScope()); // Visit his children. VisitList(node.GetChildren()); // Restore the scope. PopScope(); // Pop the generic scope. if(genScope != null) PopScope(); return node; }