public bool ParseCode() { foreach (var header in Options.Headers) { var source = Project.AddFile(header); source.Options = BuildParseOptions(source); } #if !OLD_PARSER var parser = new ClangParser(new Parser.AST.ASTContext()); #else var parser = new ClangParser(ASTContext); #endif parser.SourceParsed += OnSourceFileParsed; parser.ParseProject(Project, Options); TargetInfo = parser.GetTargetInfo(Options); #if !OLD_PARSER ASTContext = ClangParser.ConvertASTContext(parser.ASTContext); #endif return(true); }
public void BuildParseOptions() { foreach (var header in Options.Headers) { var source = Project.AddFile(header); source.Options = BuildParseOptions(source); } }
public void BuildParseOptions() { foreach (var header in Options.Modules.SelectMany(m => m.Headers)) { var source = Project.AddFile(header); if (!Options.UnityBuild) { source.Options = BuildParserOptions(source); } } if (Options.UnityBuild) { Project.Sources[0].Options = BuildParserOptions(); } }