summaryrefslogtreecommitdiff
path: root/src/ast/expr.hpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2015-03-29 23:02:21 +0800
committerJohn Hodge <tpg@mutabah.net>2015-03-29 23:02:21 +0800
commitad4b6b707dedcdc779435b16081ed0445f71ff05 (patch)
tree429096a6f984897d1488c62d93144a013c75a04d /src/ast/expr.hpp
parente60aa50103d9b24819f3dc26c783c2237f873664 (diff)
downloadmrust-ad4b6b707dedcdc779435b16081ed0445f71ff05.tar.gz
Handling for 'T::method()' (where T is a type param)
Diffstat (limited to 'src/ast/expr.hpp')
-rw-r--r--src/ast/expr.hpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ast/expr.hpp b/src/ast/expr.hpp
index d455f3cb..663beae0 100644
--- a/src/ast/expr.hpp
+++ b/src/ast/expr.hpp
@@ -21,6 +21,7 @@ class ExprNode:
public Serialisable
{
TypeRef m_res_type;
+ Position m_pos;
public:
virtual ~ExprNode() = 0;
@@ -28,6 +29,9 @@ public:
//virtual void visit(NodeVisitor& nv) const = 0;
virtual void print(::std::ostream& os) const = 0;
+ void set_pos(Position p) { m_pos = ::std::move(p); }
+ const Position& get_pos() const { return m_pos; }
+
TypeRef& get_res_type() { return m_res_type; }
friend ::std::ostream& operator<<(::std::ostream& os, const ExprNode& node);