|
ztsdb
|
Go to the documentation of this file.
31 #include "valuevar.hpp"
76 shared_ptr<BaseFrame>
r;
77 shared_ptr<Kont>
next;
83 inline operator string()
const {
87 auto atype_to_string = [](uint64_t a) {
89 if (a == AssignType::NORMAL) {
95 if (a &
WHILE) s +=
"W,";
96 if (a &
COND) s +=
"C,";
97 if (a &
ARG) s +=
"A,";
99 if (a &
END) s +=
"END,";
100 if (a &
REF) s +=
"REF,";
102 s = s.substr(0, s.length() - 1);
107 ss << (
next &&
next->var ? to_string(*
next->var) :
"") <<
"="
110 <<
" a:" << atype_to_string(
atype)
113 <<
" -> " << (
next ? string(*
next) :
"nullptr");
125 shared_ptr<Kont>
step(shared_ptr<Kont>& k,
126 vector<shpfrm>& frameStack,
130 shared_ptr<Kont> buildElChain(
const ElNode* eln,
132 shared_ptr<BaseFrame> r,
133 shared_ptr<Kont>& k);
shared_ptr< Kont > next
Next continuation.
Definition: interp.hpp:78
@ ARG
result is the eval of a function arg
Definition: interp.hpp:64
@ WHILE
result is the eval of a while loop
Definition: interp.hpp:62
@ REF
indicates the pass-by-reference
Definition: interp.hpp:67
@ ELLIPSIS
Definition: interp.hpp:60
@ NORMAL
assign in the local frame
Definition: interp.hpp:58
uint64_t atype
Assignment type.
Definition: interp.hpp:79
const E * control
The expression to evaluate.
Definition: interp.hpp:75
@ COND
result is the eval of a while condition
Definition: interp.hpp:63
Definition: interp_ctx.hpp:129
@ SILENT
result of assignment will not be printed
Definition: interp.hpp:65
AssignType
Definition: interp.hpp:57
Struct and functions implementing the interpreter.
Definition: env.hpp:36
@ GLOBAL
assign in the global frame
Definition: interp.hpp:59
shared_ptr< BaseFrame > r
Definition: interp.hpp:76
shared_ptr< Kont > step(shared_ptr< Kont > &k, vector< shpfrm > &frameStack, zcore::InterpCtx &ic)
Definition: interp.cpp:721
@ END
indicates the last assignment
Definition: interp.hpp:66
Definition: interp.hpp:49
const E * var
Definition: interp.hpp:72