Exemplo n.º 1
0
        /**
         * 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;
        }