Loom C API
Public Loom compiler C API
Loading...
Searching...
No Matches
loomc_source_options_t Struct Reference

Source creation options. More...

#include <source.h>

Data Fields

loomc_structure_type_t type
 Structure type.
loomc_host_size_t structure_size
 Size of this structure in bytes.
const void * next
 Extension chain for future source options.
loomc_source_format_t format
 Input source format.
loomc_string_view_t identifier
 Stable identifier used in diagnostics and cache keys.
loomc_byte_span_t contents
 Input bytes.
loomc_source_storage_t storage
 Storage policy for contents.
loomc_source_release_fn_t release
 Callback used when storage is LOOMC_SOURCE_STORAGE_EXTERNAL.
void * release_user_data
 User data passed to release.

Detailed Description

Source creation options.

Callers zero-initialize this descriptor, set type to LOOMC_STRUCTURE_TYPE_SOURCE_OPTIONS, set structure_size to sizeof(loomc_source_options_t), and fill the requested fields.

Field Documentation

◆ type

loomc_structure_type_t loomc_source_options_t::type

Structure type.

Must be LOOMC_STRUCTURE_TYPE_SOURCE_OPTIONS when nonzero.


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