From b79567fbc72df23f870049652d5f254aba948bea Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 16 Sep 2011 16:03:25 +0200 Subject: Support for views; integrated part --- odb/lookup.hxx | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 odb/lookup.hxx (limited to 'odb/lookup.hxx') diff --git a/odb/lookup.hxx b/odb/lookup.hxx new file mode 100644 index 0000000..6c3acff --- /dev/null +++ b/odb/lookup.hxx @@ -0,0 +1,54 @@ +// file : odb/lookup.hxx +// author : Boris Kolpackov +// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC +// license : GNU GPL v3; see accompanying LICENSE file + +#ifndef ODB_LOOKUP_HXX +#define ODB_LOOKUP_HXX + +#include + +#include + +#include + +namespace lookup +{ + struct invalid_name + { + }; + + struct unable_to_resolve + { + unable_to_resolve (std::string const& n, bool l): name_ (n), last_ (l) {} + + std::string const& + name () const {return name_;} + + // Last component in the name. + // + bool + last () const {return last_;} + + private: + std::string name_; + bool last_; + }; + + std::string + parse_scoped_name (std::string& token, + cpp_ttype& type, + cxx_lexer& lexer); + + tree + resolve_scoped_name (std::string& token, + cpp_ttype& type, + cpp_ttype& previous_type, + cxx_lexer& lexer, + tree start_scope, + std::string& name, + bool is_type, + tree* end_scope = 0); +} + +#endif // ODB_LOOKUP_HXX -- cgit v1.1