Enzo
Loading...
Searching...
No Matches
enzo::daslang::ThreadState Struct Reference

A daslang runtime context that also carries our evaluation world. More...

#include <ThreadState.h>

Inheritance diagram for enzo::daslang::ThreadState:

Public Member Functions

 ThreadState (uint32_t stackSize)
 
 ThreadState (const ThreadState &other, uint32_t category)
 

Public Attributes

const expr::ExpressionContext * expressionContext = nullptr
 The world the running function reads, a ScriptContext when primitiveIndex is set.
 
std::optional< size_t > primitiveIndex
 The input primitive the running script works on, empty outside a script run.
 
std::vector< String > warnings
 The warnings the runs on this context added, without duplicates.
 

Detailed Description

A daslang runtime context that also carries our evaluation world.

daslang hands every native function the context it is running in, so hanging the ExpressionContext here is how prm() and friends reach back into the app without a global. The pointer is set for the span of one evaluation and restored after, since evaluations nest.


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