Console: Parser cleanup
[senf.git] / Console / Executor.hh
index e126590..5f1cc46 100644 (file)
@@ -120,7 +120,7 @@ namespace console {
                                              are accessible via the executor. This value defaults to
                                              senf::console::root(). */
 
-        Executor & policy(SecurityPolicy policy); ///< Set security policy
+        Executor & policy(SecurityPolicy policy = SecurityPolicy()); ///< Set security policy
                                         /**< The security policy is called before traversing a node
                                              to validate that access. */
 
@@ -128,7 +128,6 @@ namespace console {
 
     private:
         GenericNode & traverseNode(ParseCommandInfo::TokensRange const & path);
-        GenericNode & traverseCommand(ParseCommandInfo::CommandPathRange const & path); 
         DirectoryNode & traverseDirectory(ParseCommandInfo::TokensRange const & path);
 
         template <class ForwardRange>
@@ -142,11 +141,18 @@ namespace console {
         SecurityPolicy policy_;
         DirectoryNode::weak_ptr cwd_;
         DirectoryNode::weak_ptr oldCwd_;
-        typedef std::vector<DirectoryNode::weak_ptr> DirStack;
+        struct DirEntry {
+            DirEntry(DirectoryNode::weak_ptr dir_, bool skip_) : dir(dir_), skip(skip_) {}
+            DirectoryNode::weak_ptr dir;
+            bool skip;
+        };
+        typedef std::vector<DirEntry> DirStack;
         DirStack dirstack_;
 
         bool autocd_;
         bool autocomplete_;
+        
+        bool skipping_;
     };