Used with ecs_script_parse() and ecs_script_eval().
More...
#include <script.h>
Used with ecs_script_parse() and ecs_script_eval().
Definition at line 164 of file script.h.
◆ ir
| bool ecs_script_eval_desc_t::ir |
Evaluate script with the IR runtime instead of the AST interpreter.
Definition at line 193 of file script.h.
◆ runtime
Reusable runtime (optional).
Definition at line 165 of file script.h.
◆ skip_unknown
| bool ecs_script_eval_desc_t::skip_unknown |
Skip unknown identifiers.
When enabled, scripts that reference unknown components, component members or functions will still load. This makes it possible to load scripts for an application without having to load the application code that registers the components used by the script.
When skip_unknown is enabled:
- An unresolved identifier that is used as a component or tag creates a placeholder tag entity with that (scoped) name.
- A value assigned to a placeholder, to a component without reflection data, or to an unknown member is parsed and discarded.
- An expression that uses an unresolved function or identifier is discarded. This includes expressions that read an unknown component (e[Unknown]) or an unknown member (e[Position].unknown), and expressions that use a variable that was itself skipped, both directly and in an interpolated string. When the expression is the condition or collection of a statement (such as for), the statement is skipped.
- A using statement with an unresolved identifier is skipped.
- A function with an unresolved parameter or return type is skipped, which makes calls to that function unresolved expressions.
- Unresolved references in IsA expressions, template base types and template instantiations are still errors, as those are structural.
Every skipped name is reported once with ecs_warn().
Definition at line 190 of file script.h.
The documentation for this struct was generated from the following file: