From 28b0b90f965f08c6363555b6e672da807f9faf7a Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sat, 19 Sep 2009 10:47:42 +0200 Subject: Open output files and generate boilerplate code --- cli/context.hxx | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'cli/context.hxx') 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 +#include #include #include @@ -17,15 +19,30 @@ using std::endl; class context { +public: + typedef std::string string; + +private: + struct data; + cutl::shared_ptr data_; + +public: + std::ostream& os; + + typedef std::map 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_; - public: - std::ostream& os; + // Escape C++ keywords, reserved names, and illegal characters. + // + string + escape (string const&) const; public: context (std::ostream& os_); -- cgit v1.1