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.hpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ast/path.hpp b/src/ast/path.hpp
index c2b345df..03aeab23 100644
--- a/src/ast/path.hpp
+++ b/src/ast/path.hpp
@@ -188,6 +188,10 @@ public:
void resolve(const Crate& crate);
+ bool is_trivial() const {
+ return m_class == RELATIVE && m_nodes.size() == 1 && m_nodes[0].args().size() == 0;
+ }
+
bool is_absolute() const { return m_class == ABSOLUTE; }
bool is_relative() const { return m_class == RELATIVE; }
size_t size() const { return m_nodes.size(); }