Ejemplo n.º 1
0
 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);
 }
Ejemplo n.º 2
0
        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);
        }