From 8d238e65a88502b897f1944b7844afffdbc0d761 Mon Sep 17 00:00:00 2001 From: olpc user Date: Mon, 9 Dec 2019 02:49:25 -0800 Subject: level 1 subref operator --- starts/meaning-vm/level-1/baseref.hpp | 1 + 1 file changed, 1 insertion(+) (limited to 'starts/meaning-vm/level-1') diff --git a/starts/meaning-vm/level-1/baseref.hpp b/starts/meaning-vm/level-1/baseref.hpp index 187b5df..e97db2d 100644 --- a/starts/meaning-vm/level-1/baseref.hpp +++ b/starts/meaning-vm/level-1/baseref.hpp @@ -28,6 +28,7 @@ struct baseref : public level0::baseref explicit operator char const *() const { return getname(self)->data.c_str(); } ref operator-(ref other) const { return hyphenate(self, other); } + ref operator[](ref subref) const { return self.get(subref); } template void vset(ref const & type, T const & v) { self.set(type, level1::alloc(v)); } -- cgit v1.2.3