meta: replace bluelib with fx
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#include "node.h"
|
||||
|
||||
#include <blue/ds/string.h>
|
||||
#include <fx/ds/string.h>
|
||||
#include <ivy/lang/ast.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -250,7 +250,7 @@ struct ivy_ast_node *ast_node_create(enum ivy_ast_node_type type)
|
||||
return node;
|
||||
}
|
||||
|
||||
void ivy_ast_node_to_string(struct ivy_ast_node *node, b_string *out)
|
||||
void ivy_ast_node_to_string(struct ivy_ast_node *node, fx_string *out)
|
||||
{
|
||||
const struct ast_node_type *type_info = get_ast_node_type(node->n_type);
|
||||
if (!type_info) {
|
||||
@@ -260,7 +260,7 @@ void ivy_ast_node_to_string(struct ivy_ast_node *node, b_string *out)
|
||||
if (type_info->n_to_string) {
|
||||
type_info->n_to_string(node, out);
|
||||
} else {
|
||||
b_string_append_cstr(
|
||||
fx_string_append_cstr(
|
||||
out, ivy_ast_node_type_to_string(node->n_type));
|
||||
}
|
||||
}
|
||||
@@ -301,15 +301,15 @@ void ivy_ast_node_extend_bounds_recursive(
|
||||
void ivy_ast_node_destroy(struct ivy_ast_node *node)
|
||||
{
|
||||
struct ivy_ast_node_iterator it = {};
|
||||
b_queue_push_back(&it.it_queue, &node->n_it.it_entry);
|
||||
fx_queue_push_back(&it.it_queue, &node->n_it.it_entry);
|
||||
node->n_it.it_depth = 0;
|
||||
|
||||
b_queue_entry *entry = b_queue_first(&it.it_queue);
|
||||
fx_queue_entry *entry = fx_queue_first(&it.it_queue);
|
||||
|
||||
while (entry) {
|
||||
struct ivy_ast_node_iterator_entry *it_entry = b_unbox(
|
||||
struct ivy_ast_node_iterator_entry *it_entry = fx_unbox(
|
||||
struct ivy_ast_node_iterator_entry, entry, it_entry);
|
||||
node = b_unbox(struct ivy_ast_node, it_entry, n_it);
|
||||
node = fx_unbox(struct ivy_ast_node, it_entry, n_it);
|
||||
|
||||
if (!node) {
|
||||
/* this should never happen. */
|
||||
@@ -322,16 +322,16 @@ void ivy_ast_node_destroy(struct ivy_ast_node *node)
|
||||
type->n_collect_children(node, &it);
|
||||
}
|
||||
|
||||
entry = b_queue_next(entry);
|
||||
entry = fx_queue_next(entry);
|
||||
}
|
||||
|
||||
while (!b_queue_empty(&it.it_queue)) {
|
||||
b_queue_entry *entry = b_queue_pop_back(&it.it_queue);
|
||||
while (!fx_queue_empty(&it.it_queue)) {
|
||||
fx_queue_entry *entry = fx_queue_pop_back(&it.it_queue);
|
||||
if (!entry) {
|
||||
break;
|
||||
}
|
||||
|
||||
node = b_unbox(struct ivy_ast_node, entry, n_it);
|
||||
node = fx_unbox(struct ivy_ast_node, entry, n_it);
|
||||
|
||||
const struct ast_node_type *type = get_ast_node_type(node->n_type);
|
||||
if (type && type->n_destroy) {
|
||||
@@ -397,15 +397,15 @@ const char *ivy_ast_node_type_to_string(enum ivy_ast_node_type v)
|
||||
|
||||
void ivy_ast_unit_add_node(struct ivy_ast_unit_node *unit, struct ivy_ast_node *child)
|
||||
{
|
||||
b_queue_push_back(&unit->n_children, &child->n_entry);
|
||||
fx_queue_push_back(&unit->n_children, &child->n_entry);
|
||||
}
|
||||
|
||||
struct ivy_ast_node *ivy_ast_unit_dequeue_node(struct ivy_ast_unit_node *unit)
|
||||
{
|
||||
b_queue_entry *entry = b_queue_pop_front(&unit->n_children);
|
||||
fx_queue_entry *entry = fx_queue_pop_front(&unit->n_children);
|
||||
if (!entry) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return b_unbox(struct ivy_ast_node, entry, n_entry);
|
||||
return fx_unbox(struct ivy_ast_node, entry, n_entry);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user