18 #define impl_afw_value_optional_release NULL
19 #define impl_afw_value_get_reference NULL
22 #define AFW_IMPLEMENTATION_SPECIFIC (const void *)&afw_data_type_function_direct
25 #define AFW_IMPLEMENTATION_INF_VARIABLES \
26 (const void *)&afw_data_type_function_direct, \
29 #define impl_afw_value_get_evaluated_meta \
30 afw_value_internal_get_evaluated_meta_default
32 #define impl_afw_value_get_evaluated_metas \
33 afw_value_internal_get_evaluated_metas_default
36 #define AFW_IMPLEMENTATION_ID "script_function"
37 #define AFW_IMPLEMENTATION_INF_SPECIFIER AFW_DEFINE_CONST_DATA
38 #define AFW_IMPLEMENTATION_INF_LABEL afw_value_script_function_definition_inf
59 result->contextual = contextual;
60 result->returns = returns;
61 result->count = count;
62 result->parameters = parameters;
85 impl_afw_value_get_data_type(
96 impl_afw_value_get_evaluated_data_type(
109 impl_afw_value_get_evaluated_data_type_parameter(
150 impl_afw_value_produce_compiler_listing(
159 afw_value_compiler_listing_begin_value(writer, instance,
160 self->contextual, xctx);
166 impl_decompile_type(writer, self->returns, xctx);
169 for (i = 0; i <
self->count; i++) {
171 impl_decompile_type(writer, self->parameters[i]->type, xctx);
189 impl_afw_value_decompile(
199 impl_decompile_type(writer, self->returns, xctx);
207 for (i = 0; i <
self->count; i++) {
214 impl_decompile_type(writer, self->parameters[i]->type, xctx);
242 impl_afw_value_get_info(
252 info->value_inf_id = &instance->inf->rti.implementation_id;
253 info->contextual =
self->contextual;
AFW_DEFINE(const afw_object_t *)
Adaptive Framework Core Internal.
Interface afw_interface implementation declares.
afw_data_type_function
Data type struct for function.
apr_size_t afw_size_t
size_t.
#define afw_memory_clear(to)
Clear preallocated memory for sizeof(*(to)).
#define afw_pool_calloc_type(instance, type, xctx)
Macro to allocate cleared memory to hold type in pool.
const afw_value_t * impl_afw_value_optional_evaluate(const afw_value_t *instance, const afw_pool_t *p, afw_xctx_t *xctx)
#define afw_value_produce_compiler_listing(instance, writer, xctx)
Call method produce_compiler_listing of interface afw_value.
#define afw_value_decompile(instance, writer, xctx)
Call method decompile of interface afw_value.
afw_value_script_function_definition_create(const afw_compile_value_contextual_t *contextual, const afw_value_type_t *returns, afw_size_t count, const afw_value_script_function_parameter_t **parameters, const afw_value_t *body, const afw_pool_t *p, afw_xctx_t *xctx)
Create function for lambda definition value.
afw_value_script_function_definition_inf
Value lambda inf.
#define afw_writer_increment_indent(instance, xctx)
Call method increment_indent of interface afw_writer.
#define afw_writer_write(instance, buffer, size, xctx)
Call method write of interface afw_writer.
#define afw_writer_write_eol(instance, xctx)
Call method write_eol of interface afw_writer.
#define afw_writer_decrement_indent(instance, xctx)
Call method decrement_indent of interface afw_writer.
#define afw_writer_write_z(writer, s_z, xctx)
Call afw_writer_write() with zero terminated string.
#define afw_writer_write_utf8(writer, S, xctx)
Call afw_writer_write() with a afw_utf8_t string.
Contextual information provided in some values.
afw_size_t value_size
Size in full_source of value source.
const afw_value_compiled_value_t * compiled_value
Compiled value this value is part of.
afw_size_t value_offset
Offset in full source of compiled value to this value.
Interface afw_data_type public struct.
Interface afw_pool public struct.
NFC normalized UTF-8 string.
Filled in by afw_value get_info method.
Interface afw_value public struct.
Struct for script function parameter.
Type meta (data type, data type parameters, and value meta object.
const afw_data_type_t * data_type
data type or NULL.
const afw_compile_value_contextual_t * data_type_parameter_contextual
contextual for data type parameter or NULL.
Interface afw_writer public struct.
Interface afw_xctx public struct.