lang: update bluelib api usage
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#include "ctx.h"
|
||||
#include "node.h"
|
||||
|
||||
#include <blue/object/string.h>
|
||||
#include <blue/ds/string.h>
|
||||
#include <ivy/lang/lex.h>
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -68,10 +68,9 @@ static void to_string(struct ivy_ast_node *node, b_string *str)
|
||||
|
||||
int i = 0;
|
||||
|
||||
b_queue_iterator it = {0};
|
||||
b_queue_foreach (&it, &unit_import->n_ident) {
|
||||
struct ivy_token *tok
|
||||
= b_unbox(struct ivy_token, it.entry, t_entry);
|
||||
b_queue_entry *entry = b_queue_first(&unit_import->n_ident);
|
||||
while (entry) {
|
||||
struct ivy_token *tok = b_unbox(struct ivy_token, entry, t_entry);
|
||||
|
||||
if (i > 0) {
|
||||
b_string_append_cstr(str, ".");
|
||||
@@ -79,6 +78,7 @@ static void to_string(struct ivy_ast_node *node, b_string *str)
|
||||
|
||||
b_string_append_cstr(str, tok->t_str);
|
||||
i++;
|
||||
entry = b_queue_next(entry);
|
||||
}
|
||||
|
||||
b_string_append_cstr(str, ")");
|
||||
|
||||
Reference in New Issue
Block a user