Finish parser
Some checks failed
CMake / ubuntu-latest - shared=OFF, pthread=OFF, posix=OFF (push) Successful in 15s
CMake / ubuntu-latest - shared=ON, pthread=OFF, posix=OFF (push) Successful in 17s
CMake / ubuntu-latest - shared=OFF, pthread=OFF, posix=ON (push) Failing after 15s
CMake / ubuntu-latest - shared=ON, pthread=OFF, posix=ON (push) Failing after 15s
CMake / ubuntu-latest - shared=OFF, pthread=ON, posix=ON (push) Failing after 13s
CMake / ubuntu-latest - shared=ON, pthread=ON, posix=ON (push) Failing after 13s

Signed-off-by: Slendi <slendi@socopon.com>
This commit is contained in:
2025-08-01 06:10:13 +03:00
parent 3d8f2270ef
commit 80af330d1b

View File

@@ -1243,9 +1243,9 @@ Value *ast_to_value(dcfg_Instance *instance, AST *root)
value->type = dcfg_ValueType_String;
value->v.s = root->v.s.s;
} else {
// FIXME: Implement
FREE(value);
return NULL;
value->type = dcfg_ValueType_MemberAccess;
value->v.ma.accessv = vector_create();
vector_add(value->v.ma.accessv, StringView, root->v.s.s);
}
} else if (root->kind == ASTKind_Path) {
value->type = dcfg_ValueType_Path;
@@ -1665,9 +1665,16 @@ bool dcfg_Value_get_array_size(dcfg_Value *value, size_t *out_size)
bool dcfg_call_function(dcfg_Value *function, dcfg_Value **args,
size_t arg_count, dcfg_Value **out_value)
{
(void)function, (void)args, (void)arg_count, (void)out_value;
// FIXME: Implement
return false;
if (function->v.f.is_builtin) {
*out_value = function->v.f.v.bi(args, arg_count);
if (!*out_value) {
return false;
}
} else {
// FIXME: Implement
return false;
}
return true;
}
bool dcfg_Value_evaluate(dcfg_Value *value, dcfg_Value **out_value)