apfl/src/messages.c
Laria Carolin Chabowski 8ca24bcd49 Implement subfunctions and argument matching
A function can now have multiple subfunctions with their own parameter
list. These parameters are now no longer constrained to variables and
blanks only, but can also be consts and list destructurings (predicates
are also already compiled but don't get evaluated yet). The first
subfunction that matches the argument list gets evaluated.
2022-08-13 00:50:26 +02:00

24 lines
1 KiB
C

#include "apfl.h"
const struct apfl_messages apfl_messages = {
.invalid_stack_index = "Invalid stack index",
.could_not_alloc_mem = "Could not allocate memory",
.input_error_while_parsing = "Input error while parsing",
.unexpected_end_of_file = "Unexpected end of file",
.feature_not_implemented = "Feature not implemented",
.corrupted_bytecode = "Bytecode is corrupted",
.not_a_list = "Value is not a list",
.not_a_dict = "Value is not a dictionary",
.key_doesnt_exist = "Key does not exist",
.value_is_not_a_container = "Value is not a container (list or dictionary)",
.wrong_key_type = "Wrong key type",
.variable_doesnt_exist = "Variable does not exist",
.not_a_c_function = "Not a C function",
.invalid_slotidx = "Invalid slot index",
.not_a_function = "Not a function",
.wrong_type = "Wrong type",
.io_error = "I/O error",
.value_doesnt_match = "Value does not match",
.invalid_matcher_state = "Matcher is in invalid state",
.no_matching_subfunction = "No matching subfunction",
};