Exemple #1
0
 public Driver(DriverOptions options, IDiagnostics diagnostics)
 {
     Options = options;
     Diagnostics = diagnostics;
     Project = new Project();
     ParserOptions = new ParserOptions();
 }
Exemple #2
0
        /// <summary>
        /// Parses the project source files.
        /// </summary>
        public void ParseProject(Project project, ParserOptions options)
        {
            // TODO: Search for cached AST trees on disk
            // TODO: Do multi-threaded parsing of source files

            foreach (var source in project.Sources)
                ParseSourceFile(source, options);
        }
Exemple #3
0
 /// <summary>
 /// Parses the project source files.
 /// </summary>
 public void ParseProject(Project project)
 {
     // TODO: Search for cached AST trees on disk
     // TODO: Do multi-threaded parsing of source files
     
     foreach (var parserResult in project.Sources.Select(s => ParseSourceFile(s)).ToList())
         parserResult.Dispose();
 }
Exemple #4
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);
 }