public override AstNode Visit(StructDefinition node) { // Use the generic scope. PseudoScope genScope = node.GetGenericScope(); if (genScope != null) { PushScope(genScope); } // Process the base structures. node.GetStructure().SetBase(currentModule.GetValueTypeClass()); // Process the base interfaces. 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(StructDefinition 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); }