hexed 0.3.0
 
Loading...
Searching...
No Matches
hexed::Interpreter Class Reference

Classes

class  Hil_unhandled_exception
 

Public Member Functions

 Interpreter (std::vector< std::string > preload={builtin_file, const_file})
 
void exec (std::string commands)
 safe to call in threads, but it's mutex-locked so it won't actually execute concurrently (for that, use child())
 
Interpreter make_sub () const
 Makes a sub-interpreter whose namespace is a subspace of this's.
 

Public Attributes

std::shared_ptr< Namespacevariables
 
std::shared_ptr< Printer_setprinter
 

Static Public Attributes

static const std::string builtin_file = "builtin.hil"
 
static const std::string const_file = "constants.hil"
 

Member Function Documentation

◆ make_sub()

Interpreter hexed::Interpreter::make_sub ( ) const

Makes a sub-interpreter whose namespace is a subspace of this's.

Thread safe. Does not preload any files (but will naturally have access to whatever this preloaded). I was tempted to call this int_sub... but that wasn't quite funny enough to be worth compromising readability.


The documentation for this class was generated from the following files: