ztsdb
Public Types | Public Member Functions | Public Attributes | List of all members
interp::Kont Struct Reference

#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 Evar
 
const Econtrol
 The expression to evaluate.
 
shared_ptr< BaseFramer
 
shared_ptr< Kontnext
 Next continuation.
 
uint64_t atype
 Assignment type.
 

Detailed Description

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'.

Member Enumeration Documentation

◆ AssignType

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.

Enumerator
NORMAL 

assign in the local frame

GLOBAL 

assign in the global frame

ELLIPSIS 

result is an argument that is part of an ellipsis

WHILE 

result is the eval of a while loop

COND 

result is the eval of a while condition

ARG 

result is the eval of a function arg

SILENT 

result of assignment will not be printed

END 

indicates the last assignment

REF 

indicates the pass-by-reference

Member Function Documentation

◆ operator string()

interp::Kont::operator string ( ) const
inline

Return a string containing a printable representation of the continuation.

Member Data Documentation

◆ r

shared_ptr<BaseFrame> interp::Kont::r

Pointer to frame in which to evaluate this continuation.

◆ var

const E* interp::Kont::var

Variable for which we are evaluating (but remember we evaluate for next->var).


The documentation for this struct was generated from the following file: