30 lines
490 B
C
30 lines
490 B
C
|
|
#include <debug.h>
|
|
|
|
#include <avl/avl.h>
|
|
|
|
#include "variable/struct.h"
|
|
|
|
#include "struct.h"
|
|
#include "foreach.h"
|
|
|
|
void scope_foreach(
|
|
const struct scope* this,
|
|
void (*foreach)(
|
|
struct string*,
|
|
truthtable_t))
|
|
{
|
|
ENTER;
|
|
|
|
for (struct avl_node_t* node = this->tree->head;
|
|
node;
|
|
node = node->next)
|
|
{
|
|
const struct variable* variable = node->item;
|
|
|
|
foreach(variable->name, variable->value);
|
|
}
|
|
|
|
EXIT;
|
|
}
|
|
|