Enzo
Loading...
Searching...
No Matches
enzo::daslang::Runtime Class Reference

Shared host for the daslang runtime. More...

#include <Runtime.h>

Public Member Functions

std::shared_ptr< CompiledProgram > compile (const String &name, const String &source, String &error)
 Compiles source text into a reusable script.
 
 Runtime (const Runtime &)=delete
 
Runtime & operator= (const Runtime &)=delete
 

Static Public Member Functions

static Runtime & instance ()
 

Detailed Description

Shared host for the daslang runtime.

Owns the one time setup of the daslang module system and turns source text into reusable compiled scripts.

Note
Every daslang consumer builds on this rather than touching daslang directly, so parameter expressions today and geometry script nodes later share one runtime and one place that knows how to compile.

Member Function Documentation

◆ compile()

std::shared_ptr< CompiledProgram > enzo::daslang::Runtime::compile ( const String & name,
const String & source,
String & error )

Compiles source text into a reusable script.

Returns
The compiled script, or null when compilation fails.
Note
On failure the daslang diagnostics are written to error.

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