public Driver(DriverOptions options, IDiagnostics diagnostics) { Options = options; Diagnostics = diagnostics; Project = new Project(); ParserOptions = new ParserOptions(); }
/// <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); }
/// <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(); }
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); }