ztsdb
|
#include <interp.hpp>
Public Types | |
enum | AssignType : uint64_t { NORMAL = 0x00000000, GLOBAL = 0x00000001, ELLIPSIS = 0x00000010, WHILE = 0x00000100, COND = 0x00001000, ARG = 0x00010000, SILENT = 0x00100000, END = 0x01000000, REF = 0x10000000 } |
Public Member Functions | |
operator string () const | |
Public Attributes | |
const E * | var |
const E * | control |
The expression to evaluate. | |
shared_ptr< BaseFrame > | r |
shared_ptr< Kont > | next |
Next continuation. | |
uint64_t | atype |
Assignment type. | |
A continuation is simply what still needs to be evaluated. Most notably, continuations contain a variable 'var' for which to evaluate the continuation, the code to be evaluated ('control'), and are chained via 'next'.
enum interp::Kont::AssignType : uint64_t |
Modifies the type of assignment that is performed. When we finish the evaluation of the 'control' in a continuation, we assign the result to the 'var' of the next continuation; the assignment is modified according to these values. For example type 'GLOBAL' will make the assignment in the global environment rather than in the local one.
|
inline |
Return a string containing a printable representation of the continuation.
shared_ptr<BaseFrame> interp::Kont::r |
Pointer to frame in which to evaluate this continuation.
const E* interp::Kont::var |
Variable for which we are evaluating (but remember we evaluate for next->var).