public Driver(DriverOptions options, IDiagnosticConsumer diagnostics) { Options = options; Diagnostics = diagnostics; Project = new Project(); ASTContext = new ASTContext(); Symbols = new SymbolContext(); Delegates = new Dictionary<Function, DelegatesPass.DelegateDefinition>(); TypeDatabase = new TypeMapDatabase(); TranslationUnitPasses = new PassBuilder<TranslationUnitPass>(this); GeneratorOutputPasses = new PassBuilder<GeneratorOutputPass>(this); }
public BindingContext(IDiagnostics diagnostics, DriverOptions options, ParserOptions parserOptions = null) { Options = options; Diagnostics = diagnostics; ParserOptions = parserOptions; Symbols = new SymbolContext(); Delegates = new Dictionary<Function, DelegatesPass.DelegateDefinition>(); TypeMaps = new TypeMapDatabase(); TypeMaps.SetupTypeMaps(Options.GeneratorKind); TranslationUnitPasses = new PassBuilder<TranslationUnitPass>(this); GeneratorOutputPasses = new PassBuilder<GeneratorOutputPass>(this); }