From 03e211d6eeb3f8f3c6f0b22f77c2074e81443952 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sun, 6 Sep 2015 18:08:38 +0800 Subject: Rough span support --- src/types.hpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/types.hpp') 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) -- cgit v1.2.3