diff options
Diffstat (limited to 'cli/context.hxx')
-rw-r--r-- | cli/context.hxx | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/cli/context.hxx b/cli/context.hxx index 28b74eb..8dc9fff 100644 --- a/cli/context.hxx +++ b/cli/context.hxx @@ -6,6 +6,8 @@ #ifndef CLI_CONTEXT_HXX #define CLI_CONTEXT_HXX +#include <map> +#include <string> #include <ostream> #include <cutl/shared-ptr.hxx> @@ -17,15 +19,30 @@ using std::endl; class context { +public: + typedef std::string string; + +private: + struct data; + cutl::shared_ptr<data> data_; + +public: + std::ostream& os; + + typedef std::map<string, string> reserved_name_map_type; + reserved_name_map_type& reserved_name_map; + private: struct data { + reserved_name_map_type reserved_name_map_; }; - cutl::shared_ptr<data> data_; - public: - std::ostream& os; + // Escape C++ keywords, reserved names, and illegal characters. + // + string + escape (string const&) const; public: context (std::ostream& os_); |