summaryrefslogtreecommitdiff
path: root/src/types.hpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2015-09-06 18:08:38 +0800
committerJohn Hodge <tpg@mutabah.net>2015-09-06 18:08:38 +0800
commit03e211d6eeb3f8f3c6f0b22f77c2074e81443952 (patch)
tree5e07ee69f9020e829e79fb700fa2f35e602b0bcb /src/types.hpp
parent0b6d7c51056ed7b8eb25af6041c4feb5e6e23051 (diff)
downloadmrust-03e211d6eeb3f8f3c6f0b22f77c2074e81443952.tar.gz
Rough span support
Diffstat (limited to 'src/types.hpp')
-rw-r--r--src/types.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/types.hpp b/src/types.hpp
index 7612e743..5bb257c7 100644
--- a/src/types.hpp
+++ b/src/types.hpp
@@ -98,6 +98,7 @@ TAGGED_UNION(TypeData, None,
class TypeRef:
public Serialisable
{
+ Span m_span;
public:
TypeData m_data;
@@ -203,6 +204,10 @@ public:
m_data(TypeData::make_TraitObject({ ::std::move(traits) }))
{}
+
+ void set_span(Span sp) { this->m_span = sp; }
+ const Span& span() { return this->m_span; }
+
/// Dereference the type (return the result of *type_instance)
bool deref(bool is_implicit);
/// Merge with another type (combines known aspects, conflitcs cause an exception)