コード例 #1
0
ファイル: Preprocessor.cs プロジェクト: manu-silicon/CppNet
        /**
         * Attempts to include the given file.
         *
         * User code may override this method to implement a virtual
         * file system.
         */
        private bool include(VirtualFile file, bool isImport, bool checkOnly)
        {
            // System.out.println("Try to include " + file);
            if (!file.isFile())
            return false;

            if(!checkOnly) {
            if(isImport) {
                if(_importedPaths.Contains(file.getPath())) {
                    return true;
                }

                _importedPaths.Add(file.getPath());
            }

            if(getFeature(Feature.DEBUG))
                System.Console.WriteLine("pp: including " + file);

            push_source(file.getSource(), true);
            }
            return true;
        }