printf("%20s (%4d) | ", entity_state_strings[i], eh->state_count[i]);
printf("\e[0K");
- for (i32 c = 0; c < eh->state_count[i] / 10; c++) printf("\xe2\x96\x88");
+ for (i32 c = 0; c < eh->state_count[i] * 50 / bh_arr_length(eh->entities); c++) printf("\xe2\x96\x88");
printf("\n");
}
}
output_dummy_progress_bar(compiler_state);
// Slowing things down for the effect
- usleep(2000);
+ usleep(1000);
if (ent.expr->token) {
OnyxFilePos pos = ent.expr->token->pos;
static void symres_struct_literal(AstStructLiteral* sl) {
// @CLEANUP
if (sl->stnode != NULL) symres_expression(&sl->stnode);
+ if (!node_is_type((AstNode *) sl->stnode)) {
+ onyx_report_error(sl->token->pos, "Struct type is not a type.");
+ return;
+ }
+
sl->stnode = (AstTyped *) symres_type((AstType *) sl->stnode);
if (sl->stnode == NULL || sl->stnode->kind == Ast_Kind_Error || sl->stnode->kind == Ast_Kind_Symbol) return;