예제 #1
0
        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);
        }
예제 #2
0
 public void BuildParseOptions()
 {
     foreach (var header in Options.Headers)
     {
         var source = Project.AddFile(header);
         source.Options = BuildParseOptions(source);
     }
 }
예제 #3
0
 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();
     }
 }