xo-interpreter: + expression sequences

This commit is contained in:
Roland Conybeare 2025-11-26 00:32:37 -05:00
commit 7ee41a4b71
7 changed files with 158 additions and 4 deletions

View file

@ -96,6 +96,11 @@ namespace xo {
/** continue after establish value of test expression **/
void do_complete_ifexpr_op();
/** interprete sequence **/
void eval_sequence_op();
/** continue after establishing value for a sequence element **/
void do_complete_sequence_op();
/** goto error state with message @p err **/
void report_error(const std::string & err);

View file

@ -37,6 +37,10 @@ namespace xo {
**/
complete_ifexpr,
/** execute remainder of expression sequence
**/
complete_sequence,
/** choose branch of if-expression + continue
*
* stack: frame with

View file

@ -34,13 +34,22 @@ namespace xo {
#endif
/** create new stack frame using allocator @p mm,
* with parent frame @p p; new frame contains values @p s0, @p s1
* with parent frame @p p; new frame contains values @p s0
**/
static gp<VsmStackFrame> push1(gc::IAlloc * mm,
gp<VsmStackFrame> p,
gp<Object> s0,
const VsmInstr * cont);
/** create new stack frame using allocator @p mm,
* with parent frame @p p; new frame contains values @p s0, @p s1
**/
static gp<VsmStackFrame> push2(gc::IAlloc * mm,
gp<VsmStackFrame> p,
gp<Object> s0,
gp<Object> s1,
const VsmInstr * cont);
/** reflect VsmStackFrame object representation **/
static void reflect_self();