128 ecs_hashmap_t var_index;
367 const ecs_iter_t *it,
FLECS_API ecs_expr_var_t * ecs_vars_declare(ecs_vars_t *vars, const char *name, ecs_entity_t type)
Declare variable in current scope.
FLECS_API ecs_expr_var_t * ecs_vars_declare_w_value(ecs_vars_t *vars, const char *name, ecs_value_t *value)
Declare variable in current scope from value.
FLECS_API ecs_expr_var_t * ecs_vars_lookup(const ecs_vars_t *vars, const char *name)
Lookup variable in scope and parent scopes.
FLECS_API int ecs_ptr_to_expr_buf(const ecs_world_t *world, ecs_entity_t type, const void *data, ecs_strbuf_t *buf)
Serialize value into expression buffer.
FLECS_API char * ecs_chresc(char *out, char in, char delimiter)
Write an escaped character.
FLECS_API int ecs_primitive_to_expr_buf(const ecs_world_t *world, ecs_primitive_kind_t kind, const void *data, ecs_strbuf_t *buf)
Serialize primitive value into string buffer.
FLECS_API char * ecs_ptr_to_expr(const ecs_world_t *world, ecs_entity_t type, const void *data)
Serialize value into expression string.
FLECS_API void ecs_vars_fini(ecs_vars_t *vars)
Cleanup variable storage.
FLECS_API char * ecs_ptr_to_str(const ecs_world_t *world, ecs_entity_t type, const void *data)
Similar as ecs_ptr_to_expr(), but serializes values to string.
FLECS_API ecs_size_t ecs_stresc(char *out, ecs_size_t size, char delimiter, const char *in)
Write an escaped string.
FLECS_API void ecs_vars_push(ecs_vars_t *vars)
Push variable scope.
FLECS_API void ecs_vars_init(ecs_world_t *world, ecs_vars_t *vars)
Init variable storage.
FLECS_API const char * ecs_parse_expr(ecs_world_t *world, const char *ptr, ecs_value_t *value, const ecs_parse_expr_desc_t *desc)
Parse expression into value.
FLECS_API int ecs_vars_pop(ecs_vars_t *vars)
Pop variable scope.
struct ecs_expr_var_t ecs_expr_var_t
Storage for parser variables.
FLECS_API void ecs_iter_to_vars(const ecs_iter_t *it, ecs_vars_t *vars, int offset)
Convert iterator to vars This operation converts an iterator to a variable array.
FLECS_API int ecs_ptr_to_str_buf(const ecs_world_t *world, ecs_entity_t type, const void *data, ecs_strbuf_t *buf)
Serialize value into string buffer.
FLECS_API char * ecs_astresc(char delimiter, const char *in)
Return escaped string.
struct ecs_parse_expr_desc_t ecs_parse_expr_desc_t
Used with ecs_parse_expr().
FLECS_API char * ecs_interpolate_string(ecs_world_t *world, const char *str, const ecs_vars_t *vars)
Evaluate interpolated expressions in string.
const char * ecs_chrparse(const char *in, char *out)
Parse an escaped character.
FLECS_API const char * ecs_parse_expr_token(const char *name, const char *expr, const char *ptr, char *token)
Parse expression token.
ecs_id_t ecs_entity_t
An entity identifier.
struct ecs_world_t ecs_world_t
A world is the container for all ECS data and supporting features.
Storage for parser variables.
Used with ecs_parse_expr().