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
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:
15
src/dcfg.c
15
src/dcfg.c
@@ -1243,9 +1243,9 @@ Value *ast_to_value(dcfg_Instance *instance, AST *root)
|
|||||||
value->type = dcfg_ValueType_String;
|
value->type = dcfg_ValueType_String;
|
||||||
value->v.s = root->v.s.s;
|
value->v.s = root->v.s.s;
|
||||||
} else {
|
} else {
|
||||||
// FIXME: Implement
|
value->type = dcfg_ValueType_MemberAccess;
|
||||||
FREE(value);
|
value->v.ma.accessv = vector_create();
|
||||||
return NULL;
|
vector_add(value->v.ma.accessv, StringView, root->v.s.s);
|
||||||
}
|
}
|
||||||
} else if (root->kind == ASTKind_Path) {
|
} else if (root->kind == ASTKind_Path) {
|
||||||
value->type = dcfg_ValueType_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,
|
bool dcfg_call_function(dcfg_Value *function, dcfg_Value **args,
|
||||||
size_t arg_count, dcfg_Value **out_value)
|
size_t arg_count, dcfg_Value **out_value)
|
||||||
{
|
{
|
||||||
(void)function, (void)args, (void)arg_count, (void)out_value;
|
if (function->v.f.is_builtin) {
|
||||||
|
*out_value = function->v.f.v.bi(args, arg_count);
|
||||||
|
if (!*out_value) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
// FIXME: Implement
|
// FIXME: Implement
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool dcfg_Value_evaluate(dcfg_Value *value, dcfg_Value **out_value)
|
bool dcfg_Value_evaluate(dcfg_Value *value, dcfg_Value **out_value)
|
||||||
|
Reference in New Issue
Block a user