Remove typeof dependency
Some checks failed
CMake / ubuntu-latest - shared=OFF, pthread=OFF, posix=OFF (push) Successful in 16s
CMake / ubuntu-latest - shared=ON, pthread=OFF, posix=OFF (push) Successful in 15s
CMake / ubuntu-latest - shared=OFF, pthread=OFF, posix=ON (push) Failing after 14s
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 8s

Signed-off-by: Slendi <slendi@socopon.com>
This commit is contained in:
2025-07-27 23:23:34 +03:00
parent a8ea92dd5c
commit f1e4804167
5 changed files with 72 additions and 97 deletions

View File

@@ -788,7 +788,7 @@ AST *parser_parse_dot_access(Parser *parser, StringView *current)
return NULL;
}
if (current) {
vector_add(&accessv, *current);
vector_add(&accessv, StringView, *current);
}
SourceLocation loc = parser->cur.location;
@@ -800,7 +800,7 @@ AST *parser_parse_dot_access(Parser *parser, StringView *current)
}
last_loc = parser->cur.location;
vector_add(&accessv, parser->cur.v.s);
vector_add(&accessv, StringView, parser->cur.v.s);
if (!Parser_next(parser)) {
strcpy(parser->instance->last_error,
@@ -881,7 +881,7 @@ AST *parser_parse_value(Parser *parser)
return NULL;
}
vector_add(&ast->v.f.argv, parser->cur.v.s);
vector_add(&ast->v.f.argv, StringView, parser->cur.v.s);
if (!Parser_next(parser)) {
vector_free(ast->v.f.argv);
FREE(ast);
@@ -933,7 +933,7 @@ AST *parser_parse_value(Parser *parser)
FREE(ast);
return NULL;
}
vector_add(&ast->v.a.childv, value);
vector_add(&ast->v.a.childv, AST *, value);
}
ast->location.range.end = rbracket_loc.range.end;
return ast;
@@ -991,7 +991,7 @@ AST *parser_parse_value(Parser *parser)
.k = key,
.v = value,
};
vector_add(&ast->v.bl.entryv, entry);
vector_add(&ast->v.bl.entryv, ASTBlock_Entry, entry);
}
return ast;
} else if (Parser_accept(parser, TokenType_LParen, NULL)) {
@@ -1020,7 +1020,7 @@ AST *parser_parse_value(Parser *parser)
return NULL;
}
vector_add(&ast->v.fc.argv, value);
vector_add(&ast->v.fc.argv, AST *, value);
}
ast->location.range.end = rparen_loc.range.end;
@@ -1069,7 +1069,7 @@ static Value *ensure_child_obj(Instance *inst, Value *parent, StringView key)
child->v.o.entryv = vector_create();
ValueObjectEntry e = { .k = key, .v = child };
vector_add(&obj->entryv, e);
vector_add(&obj->entryv, ValueObjectEntry, e);
return child;
}
@@ -1150,7 +1150,7 @@ Value *ast_to_value(dcfg_Instance *instance, AST *root)
if (!replaced) {
ValueObjectEntry new_e = { .k = field, .v = rhs };
vector_add(&obj->entryv, new_e);
vector_add(&obj->entryv, ValueObjectEntry, new_e);
}
}
} else if (root->kind == ASTKind_Array) {
@@ -1166,14 +1166,14 @@ Value *ast_to_value(dcfg_Instance *instance, AST *root)
FREE(value);
return NULL;
}
vector_add(&value->v.a.valuev, v);
vector_add(&value->v.a.valuev, Value *, v);
}
} else if (root->kind == ASTKind_Function) {
value->type = dcfg_ValueType_Function;
value->v.f.is_builtin = false;
value->v.f.v.f.argv = vector_create();
for (size_t i = 0; i < vector_size(root->v.f.argv); i++) {
vector_add(&value->v.f.v.f.argv, root->v.f.argv[i]);
vector_add(&value->v.f.v.f.argv, StringView, root->v.f.argv[i]);
}
Value *v = ast_to_value(instance, root->v.f.body);
if (!v) {
@@ -1206,7 +1206,7 @@ Value *ast_to_value(dcfg_Instance *instance, AST *root)
FREE(value);
return NULL;
}
vector_add(&value->v.c.argv, arg);
vector_add(&value->v.c.argv, Value *, arg);
}
}
return value;
@@ -1313,10 +1313,10 @@ dcfg_Value *dcfg_parse(dcfg_Instance *instance, dcfg_StringView const file_path)
}
instance->last_error[0] = '\0';
vector_add(&instance->sourcev, str);
vector_add(&instance->sourcev, StringView, str);
v->i_sourcev_idx = vector_size(instance->sourcev) - 1;
vector_add(&instance->source_pathv, abs_sv);
vector_add(&instance->source_pathv, StringView, abs_sv);
v->i_source_pathv_idx = vector_size(instance->source_pathv) - 1;
return v;