public void AddTranslationUnitPass(TranslationUnitPass pass) { TranslationUnitPasses.AddPass(pass); }
public void SetupPasses(ILibrary library) { TranslationUnitPasses.AddPass(new CleanUnitPass(Options)); TranslationUnitPasses.AddPass(new SortDeclarationsPass()); TranslationUnitPasses.AddPass(new ResolveIncompleteDeclsPass()); TranslationUnitPasses.AddPass(new CheckIgnoredDeclsPass()); if (Options.IsCSharpGenerator && Options.GenerateInlines) { TranslationUnitPasses.AddPass(new GenerateInlinesCodePass()); } library.SetupPasses(this); TranslationUnitPasses.AddPass(new FindSymbolsPass()); TranslationUnitPasses.AddPass(new CheckStaticClass()); TranslationUnitPasses.AddPass(new MoveOperatorToClassPass()); TranslationUnitPasses.AddPass(new MoveFunctionToClassPass()); TranslationUnitPasses.AddPass(new GenerateAnonymousDelegatesPass()); if (Options.GenerateConversionOperators) { TranslationUnitPasses.AddPass(new ConstructorToConversionOperatorPass()); } TranslationUnitPasses.AddPass(new MarshalPrimitivePointersAsRefTypePass()); TranslationUnitPasses.AddPass(new CheckAmbiguousFunctions()); TranslationUnitPasses.AddPass(new CheckOperatorsOverloadsPass()); TranslationUnitPasses.AddPass(new CheckVirtualOverrideReturnCovariance()); Generator.SetupPasses(); TranslationUnitPasses.AddPass(new FieldToPropertyPass()); TranslationUnitPasses.AddPass(new CleanInvalidDeclNamesPass()); TranslationUnitPasses.AddPass(new CheckIgnoredDeclsPass()); TranslationUnitPasses.AddPass(new CheckFlagEnumsPass()); TranslationUnitPasses.AddPass(new CheckDuplicatedNamesPass()); TranslationUnitPasses.AddPass(new RenameRootNamespacesPass()); if (Options.IsCSharpGenerator) { TranslationUnitPasses.AddPass(new GenerateAbstractImplementationsPass()); if (Options.GenerateDefaultValuesForArguments) { TranslationUnitPasses.AddPass(new HandleDefaultParamValuesPass()); TranslationUnitPasses.AddPass(new FixDefaultParamValuesOfOverridesPass()); } } if (Options.GenerateInterfacesForMultipleInheritance) { TranslationUnitPasses.AddPass(new MultipleInheritancePass()); TranslationUnitPasses.AddPass(new ParamTypeToInterfacePass()); } TranslationUnitPasses.AddPass(new CheckVTableComponentsPass()); if (Options.IsCSharpGenerator) { TranslationUnitPasses.AddPass(new DelegatesPass()); } if (Options.GenerateProperties) { TranslationUnitPasses.AddPass(new GetterSetterToPropertyPass()); } if (Options.GeneratePropertiesAdvanced) { TranslationUnitPasses.AddPass(new GetterSetterToPropertyAdvancedPass()); } }