From 322d55823e682766e15adaaf54907a42d5ae4ab2 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Wed, 4 Apr 2012 02:28:07 -0500 Subject: post.x = y defines metadata tag x --- src/item.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/item.cc') diff --git a/src/item.cc b/src/item.cc index 5262d1db..17d46652 100644 --- a/src/item.cc +++ b/src/item.cc @@ -398,6 +398,13 @@ value_t get_comment(item_t& item) } } +void item_t::define(const symbol_t::kind_t, const string& name, + expr_t::ptr_op_t def) +{ + bind_scope_t bound_scope(*scope_t::default_scope, *this); + set_tag(name, def->calc(bound_scope)); +} + expr_t::ptr_op_t item_t::lookup(const symbol_t::kind_t kind, const string& name) { -- cgit v1.2.3