summaryrefslogtreecommitdiff
path: root/src/ast/path.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ast/path.hpp')
-rw-r--r--src/ast/path.hpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/ast/path.hpp b/src/ast/path.hpp
index c47f37ca..5c2481a0 100644
--- a/src/ast/path.hpp
+++ b/src/ast/path.hpp
@@ -13,6 +13,7 @@
#include <tagged_union.hpp>
#include <string>
#include "../include/span.hpp"
+#include "../include/ident.hpp"
class TypeRef;
@@ -161,6 +162,7 @@ public:
::std::string name;
} ),
(Relative, struct { // General relative
+ Ident::Hygine hygine; // Taken from the first ident
::std::vector<PathNode> nodes;
} ),
(Self, struct { // Module-relative
@@ -224,8 +226,8 @@ public:
// RELATIVE
struct TagRelative {};
- Path(TagRelative, ::std::vector<PathNode> nodes):
- m_class( Class::make_Relative({ mv$(nodes) }) )
+ Path(TagRelative, Ident::Hygine hygine, ::std::vector<PathNode> nodes):
+ m_class( Class::make_Relative({ mv$(hygine), mv$(nodes) }) )
{}
// SELF
struct TagSelf {};
@@ -266,8 +268,9 @@ public:
Path& operator+=(const Path& x);
void append(PathNode node) {
- if( m_class.is_Invalid() )
- m_class = Class::make_Relative({});
+ assert( !m_class.is_Invalid() );
+ //if( m_class.is_Invalid() )
+ // m_class = Class::make_Relative({});
nodes().push_back( mv$(node) );
m_binding = PathBinding();
}