From 0804aa8543136f3e1585e0e59a14f9c331c0c448 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 20 Sep 2009 18:47:48 +0200 Subject: Add name processor Name processor is a separate pass over the semantics graph that assigns names to various constructs while making sure there are no name clashes. --- cli/context.hxx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'cli/context.hxx') diff --git a/cli/context.hxx b/cli/context.hxx index 4d88fe9..eb2e412 100644 --- a/cli/context.hxx +++ b/cli/context.hxx @@ -9,6 +9,7 @@ #include #include #include +#include // std::size_t #include @@ -20,6 +21,7 @@ using std::endl; class context { public: + typedef std::size_t size_t; typedef std::string string; private: @@ -46,6 +48,19 @@ public: escape (string const&) const; public: + static string const& + ename (semantics::nameable& n) + { + return n.context ().get ("name"); + } + + static string const& + emember (semantics::nameable& n) + { + return n.context ().get ("member"); + } + +public: context (std::ostream&, semantics::cli_unit&); -- cgit v1.1