/* SPDX-License-Identifier: copyleft-next-0.3.1 */
/* Copyright 2024 Kim Kuparinen < kimi.h.kuparinen@gmail.com > */

#include <fwd/analyze.h>
#include <assert.h>

int analyze_root(struct scope *scope, struct ast *root)
{
	foreach_node(node, root) {
		assert(node->k == AST_PROC_DEF);
		scope_add_proc(scope, node);
	}

	return 0;
}