diff options
Diffstat (limited to 'src/ast/path.hpp')
-rw-r--r-- | src/ast/path.hpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ast/path.hpp b/src/ast/path.hpp index 89804b61..18ebea49 100644 --- a/src/ast/path.hpp +++ b/src/ast/path.hpp @@ -245,6 +245,14 @@ public: bool has_binding() const { return !value.is_Unbound() || !type.is_Unbound() || !macro.is_Unbound(); } + void merge_from(const Bindings& x) { + if(value.is_Unbound()) + value = x.value.clone(); + if(type.is_Unbound()) + type = x.type.clone(); + if(macro.is_Unbound()) + macro = x.macro.clone(); + } } m_bindings; virtual ~Path(); |