9 #ifndef __AFW_VALUE_INTERNAL_H__
10 #define __AFW_VALUE_INTERNAL_H__
31 #define AFW_VALUE_SCRIPT_SUPPORT_NUMBER_NONE 0
32 #define AFW_VALUE_SCRIPT_SUPPORT_NUMBER_ASSIGN 1
33 #define AFW_VALUE_SCRIPT_SUPPORT_NUMBER_BREAK 2
34 #define AFW_VALUE_SCRIPT_SUPPORT_NUMBER_CONST 3
35 #define AFW_VALUE_SCRIPT_SUPPORT_NUMBER_CONTINUE 4
36 #define AFW_VALUE_SCRIPT_SUPPORT_NUMBER_DO_WHILE 5
37 #define AFW_VALUE_SCRIPT_SUPPORT_NUMBER_FOR 6
38 #define AFW_VALUE_SCRIPT_SUPPORT_NUMBER_FOREACH 7
39 #define AFW_VALUE_SCRIPT_SUPPORT_NUMBER_IF 8
40 #define AFW_VALUE_SCRIPT_SUPPORT_NUMBER_LOC 9
41 #define AFW_VALUE_SCRIPT_SUPPORT_NUMBER_RETURN 10
42 #define AFW_VALUE_SCRIPT_SUPPORT_NUMBER_WHILE 11
45 #define AFW_VALUE_COMPILER_LISTING_IF_NOT_LIMIT_EXCEEDED \
46 if (writer->indent > xctx->env->evaluation_stack_maximum_count) { \
47 afw_writer_write_z(writer, ">>> Limit exceeded", xctx); \
48 afw_writer_write_eol(writer, xctx); \
53 afw_value_block_statement_type_sequential,
54 afw_value_block_statement_type_break,
55 afw_value_block_statement_type_continue,
56 afw_value_block_statement_type_return
57 } afw_value_block_statement_type_t;
124 afw_value_block_statement_type_t type;
481 typedef const afw_value_t *(*afw_value_meta_special_get_t) (
486 typedef void (*afw_value_meta_special_set_t) (
494 afw_value_meta_special_get_t get;
495 afw_value_meta_special_set_t set;
499 afw_value_call_built_in_function(
508 afw_value_internal_create_meta_object_self(
514 afw_value_internal_get_evaluated_meta_default(
520 afw_value_internal_get_evaluated_metas_default(
526 afw_value_internal_get_evaluated_meta_for_list(
532 afw_value_internal_get_evaluated_metas_for_list(
538 afw_value_internal_get_evaluated_meta_for_object(
544 afw_value_internal_get_evaluated_metas_for_object(
550 afw_value_meta_values_list_for_object_create(
557 afw_value_meta_values_list_for_list_create(
581 apr_array_header_t *ary;
582 apr_array_header_t *child_compiler_listings;
588 const char *prefix_format;
602 afw_value_compiler_listing_for_child(
608 afw_value_compiler_listing_begin_value(
615 afw_value_compiler_listing_end_value(
621 afw_value_compiler_listing_call_args(
627 afw_value_compiler_listing_value(
635 afw_value_block_statement_type_t *type,
643 afw_value_block_evaluate_block(
645 afw_value_block_statement_type_t *type,
652 afw_value_block_evaluate_for(
654 afw_value_block_statement_type_t *type,
661 afw_value_block_evaluate_foreach(
663 afw_value_block_statement_type_t *type,
670 afw_value_block_evaluate_do_while(
672 afw_value_block_statement_type_t *type,
679 afw_value_block_evaluate_if(
681 afw_value_block_statement_type_t *type,
689 afw_value_block_evaluate_while(
691 afw_value_block_statement_type_t *type,
#define AFW_DEFINE_INTERNAL(type)
Define an internal function for /src/afw/ source*.c files.
#define AFW_BEGIN_DECLARES
#define AFW_DECLARE_INTERNAL(type)
Declare an internal function for /src/afw/ source*.h files.
Interfaceafw_interface header.
Internal header file for Adaptive Framework memory.
apr_size_t afw_size_t
size_t.
const afw_value_t *(* afw_function_thunk_execute_t)(const afw_value_function_thunk_t *function, afw_size_t argc, const afw_value_t *const *argv, const afw_pool_t *p, afw_xctx_t *xctx)
Typedef for function thunk execute functions.
afw_value_block_evaluate_statement(afw_function_execute_t *x, afw_value_block_statement_type_t *type, afw_boolean_t allow_return, afw_boolean_t is_loop, const afw_value_t *block, const afw_pool_t *p, afw_xctx_t *xctx)
afw_value_compiler_listing_to_string_instance(const afw_value_t *value, afw_value_compiler_listing_t *parent, const afw_utf8_t *tab, const afw_pool_t *p, afw_xctx_t *xctx)
Contextual information provided in some values.
Interface afw_data_type public struct.
Function execute parameter.
Interface afw_list public struct.
Interface afw_object public struct.
Interface afw_object_setter public struct.
Interface afw_pool public struct.
NFC normalized UTF-8 string.
Struct for annotated value.
Struct for value assignment.
Struct for assignment target value.
struct for afw_value_block_frame_t
struct for afw_value_block_t
struct for afw_value_block_symbol_t
Struct for contextual and args for call values.
const afw_value_t *const * argv
const afw_compile_value_contextual_t * contextual
Struct for expression value.
Struct for function value.
Struct for function thunk value.
void * ctx
ctx passed on create.
const afw_value_t * like_function_value
The thunk signature is like this function.
const afw_utf8_t * name
name.
afw_function_thunk_execute_t execute
Function called to execute this thunk.
const afw_utf8_t * detail
includes name and source location.
Interface afw_value_inf_s struct.
Filled in by afw_value get_info method.
Struct for compiled value value.
afw_size_t line_count
The total number of lines in source.
const afw_object_t * strings
Shared strings.
const afw_value_compiled_value_t * parent
The parent compiled value or NULL.
const afw_utf8_t * full_source_type
The type of the full source.
const afw_pool_t * p
Pool containing value.
const afw_utf8_t * full_source
The full source that was compiled.
const afw_utf8_t * source_location
Source location provided to compiler.
const afw_compile_value_contextual_t * contextual
Contextual Info.
const afw_object_t * literals
Literal values.
afw_size_t longest_line
The longest line excluding .
const afw_value_t * root_value
The root value.
const afw_utf8_t * reference_id
A uuid for this compiled value.
struct for list expression value.
struct for data type list values.
struct for object expression value.
struct for data type object values.
Struct for qualified variable reference value.
Struct for reference_by_key value.
Interface afw_value public struct.
Struct for script function parameter.
Struct for lambda parameter.
Struct for template value.
afw_size_t dimension
Number of subscripts needed to access cell.
const afw_value_type_t * cell_type
Cell type. If NULL, cell is untyped.
Type meta (data type, data type parameters, and value meta object.
const afw_value_type_list_t * list_type
list type (If NULL, 1 dimension with untyped cells).
const afw_utf8_t * media_type
string, base64Binary, hexBinary.
const afw_utf8_t * object_type_id
object and objectId.
const afw_object_t * value_meta_object
AdaptiveValueMeta object or NULL.
const afw_value_type_t * type
unevaluated.
const afw_data_type_t * data_type
data type or NULL.
const afw_value_type_t * return_type
expression, hybrid, script and template.
const afw_compile_value_contextual_t * data_type_parameter_contextual
contextual for data type parameter or NULL.
const afw_value_script_function_signature_t * function_signature
function.
Interface afw_writer public struct.
Interface afw_xctx public struct.