From c8bb547bea279af2bb48c13260f98aa8add07131 Mon Sep 17 00:00:00 2001 From: olpc user Date: Fri, 10 Jan 2020 14:55:19 -0800 Subject: move intellect-framework-from-internet into folder --- .../level-2-wip-stmtexprs/statementref.hpp | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 intellect-framework-from-internet/starts/meaning-vm/level-2-wip-stmtexprs/statementref.hpp (limited to 'intellect-framework-from-internet/starts/meaning-vm/level-2-wip-stmtexprs/statementref.hpp') diff --git a/intellect-framework-from-internet/starts/meaning-vm/level-2-wip-stmtexprs/statementref.hpp b/intellect-framework-from-internet/starts/meaning-vm/level-2-wip-stmtexprs/statementref.hpp new file mode 100644 index 0000000..502ecf4 --- /dev/null +++ b/intellect-framework-from-internet/starts/meaning-vm/level-2-wip-stmtexprs/statementref.hpp @@ -0,0 +1,31 @@ +#pragma once + +#include "common.hpp" +#include "../level-0/concept.hpp" + +namespace intellect { +namespace level2 { + +// this class is returned by some of the baseref operators. +// its purpose is to evaluate code when it goes out of +// scope, so as to facilitate syntactic behavior. +struct statementref +{ + statementref(ref r); + statementref(statementref const &) = delete; + ~statementref(); + + operator ref(); + + static statementref makebinary( + ref lhs, ref kind, ref rhs, + std::function expraction = {}, + std::function stmtaction = {} + ); + +private: + level0::concept * r; +}; + +} +} -- cgit v1.2.3