mirror of
https://github.com/Ed94/metadesk.git
synced 2026-08-07 08:08:48 +00:00
oops
This commit is contained in:
+3
-2
@@ -583,8 +583,9 @@ sll__queue_push_nz(
|
|||||||
inline void
|
inline void
|
||||||
sll__queue_push_front_nz(void* nil, void** f, void** l, void* n, void** n_next) {
|
sll__queue_push_front_nz(void* nil, void** f, void** l, void* n, void** n_next) {
|
||||||
if (check_nil(nil, *f)) {
|
if (check_nil(nil, *f)) {
|
||||||
*f = n;
|
*f = n;
|
||||||
*l = n;
|
*l = n;
|
||||||
|
*n_next = nil;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
*n_next = f;
|
*n_next = f;
|
||||||
|
|||||||
+1
-1
@@ -695,7 +695,7 @@ str8_list_push_frontf__arena(Arena *arena, String8List *list, char *fmt, ...) {
|
|||||||
inline String8Node*
|
inline String8Node*
|
||||||
str8_list_push__ainfo(AllocatorInfo ainfo, String8List* list, String8 string) {
|
str8_list_push__ainfo(AllocatorInfo ainfo, String8List* list, String8 string) {
|
||||||
String8Node* node = alloc_array_no_zero(ainfo, String8Node, 1);
|
String8Node* node = alloc_array_no_zero(ainfo, String8Node, 1);
|
||||||
str8_list_push_node_front_set_string(list, node, string);
|
str8_list_push_node_set_string(list, node, string);
|
||||||
return(node);
|
return(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -25,5 +25,16 @@ int main()
|
|||||||
TokenizeResult lexed = tokenize_from_text (arena, hello_world_mdesk);
|
TokenizeResult lexed = tokenize_from_text (arena, hello_world_mdesk);
|
||||||
ParseResult parsed = parse_from_text_tokens(arena, text(path_hello_world_mdesk), hello_world_mdesk, lexed.tokens);
|
ParseResult parsed = parse_from_text_tokens(arena, text(path_hello_world_mdesk), hello_world_mdesk, lexed.tokens);
|
||||||
|
|
||||||
|
#define str8_list_iter(list, elem) list.first; elem; elem = elem->next
|
||||||
|
String8List debug_list = debug_string_list_from_tree(arena, parsed.root);
|
||||||
|
|
||||||
|
printf("Parsed listing:\n");
|
||||||
|
// for (String8Node* elem = str8_list_iter(debug_list, elem))
|
||||||
|
for (String8Node* elem = debug_list.first; elem; elem = elem->next)
|
||||||
|
{
|
||||||
|
String8 entry = elem->string;
|
||||||
|
printf("\tentry: %*s\n", (int)entry.size, entry.str);
|
||||||
|
}
|
||||||
|
|
||||||
deinit(& ctx);
|
deinit(& ctx);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user