Skip to content
Flecs v4.1
ecs_script_source_t Struct Reference

Source location of a script statement. More...

#include <script.h>

Public Attributes

int32_t offset
 Offset of the first character of the statement.
int32_t length
 Number of bytes occupied by the statement.
int32_t line
 Line of the first character (1 based).
int32_t column
 Column of the first character (1 based).
bool has_scope
 Whether the statement is followed by a { } scope.
ecs_entity_t template_
 Set when the statement is inside the body of a template statement.

Detailed Description

Source location of a script statement.

Returned by ecs_script_entity_source(). The offset and length are byte offsets into ecs_script_t::code.

Definition at line 462 of file script.h.

Member Data Documentation

◆ column

int32_t ecs_script_source_t::column

Column of the first character (1 based).

Definition at line 466 of file script.h.

◆ has_scope

bool ecs_script_source_t::has_scope

Whether the statement is followed by a { } scope.

Definition at line 467 of file script.h.

◆ length

int32_t ecs_script_source_t::length

Number of bytes occupied by the statement.

Definition at line 464 of file script.h.

◆ line

int32_t ecs_script_source_t::line

Line of the first character (1 based).

Definition at line 465 of file script.h.

◆ offset

int32_t ecs_script_source_t::offset

Offset of the first character of the statement.

Definition at line 463 of file script.h.

◆ template_

ecs_entity_t ecs_script_source_t::template_

Set when the statement is inside the body of a template statement.

When set, this is the template entity that the body belongs to, and the statement is shared by every instance of that template: editing it changes all instances. Zero for regular entity statements.

Definition at line 473 of file script.h.


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