示例#1
0
        public CodeFile GetIncludeFile(string sourceFileName, string fileName, bool searchCurrentDir, IEnumerable <string> parentFiles)
        {
            var includeFile = _store.GetIncludeFile(_appSettings, sourceFileName, fileName, searchCurrentDir, parentFiles);

            if (includeFile == null)
            {
                return(null);
            }

            return(includeFile.GetCodeFile(_appSettings, this, parentFiles));
        }
示例#2
0
        private static void CreateStdLibModel(ProbeAppSettings appSettings)
        {
            var tempStore   = new FileStore();
            var includeFile = tempStore.GetIncludeFile(appSettings, null, "stdlib.i", false, new string[0]);

            if (includeFile != null)
            {
                _stdLibModel = tempStore.CreatePreprocessedModel(appSettings, includeFile.GetSource(appSettings),
                                                                 includeFile.FullPathName, false, "stdlib.i model", null);
            }
            else
            {
                var blankSource = new CodeSource();
                blankSource.Flush();

                _stdLibModel = tempStore.CreatePreprocessedModel(appSettings, blankSource, "stdlib.i", false,
                                                                 "stdlib.i model (blank)", null);
            }

            _stdLibDefines = _stdLibModel.PreprocessorModel.Preprocessor.Defines.ToArray();
        }