summaryrefslogtreecommitdiff
path: root/cli/parser.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-05-10 17:54:18 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-05-10 17:54:18 +0200
commit443293aaf09eca7c3b88d621d056c4effee2c248 (patch)
treea35c7b2354295b5b73462c0806e04e2deef58171 /cli/parser.hxx
parent4f9022f24c4591391637121c7274d9855b37bd93 (diff)
Implement option class inheritance
For now multiple, non-virtual inheritance is supported. An option class can now also be declared abstract using the class c = 0 {...}; syntax. New option, --exclude-base, controls whether base class information is present in usage and documentation.
Diffstat (limited to 'cli/parser.hxx')
-rw-r--r--cli/parser.hxx19
1 files changed, 19 insertions, 0 deletions
diff --git a/cli/parser.hxx b/cli/parser.hxx
index c93b9a0..34d3450 100644
--- a/cli/parser.hxx
+++ b/cli/parser.hxx
@@ -56,6 +56,25 @@ private:
void
recover (token& t);
+ // Lookup a name in the specified starting scope. Empty scope denotes
+ // the global namespace. Starting scope should be a fully-qualified
+ // name while name can be qualified but should not be fully-qualified
+ // (to lookup a fully-qualified name use the global namespace as the
+ // starting scope).
+ //
+ // If starting unit is not specified, the lookup is performed in the
+ // current unit. It then continues in all the units that the starting
+ // unit includes, transitively.
+ //
+ // The outer flag specifies whether to search the outer scopes.
+ //
+ template <typename T>
+ T*
+ lookup (std::string const& scope,
+ std::string const& name,
+ semantics::cli_unit* unit = 0,
+ bool outer = true);
+
private:
bool valid_;
semantics::path const* path_;