summaryrefslogtreecommitdiff
path: root/check.c
blob: 238c28561552a0cc8da839826222ef5705b3f67a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "check.h"
#include <stddef.h>

int
check_atom(Token *list)
{
	while (list != NULL) {
		if (list->type == TOK_GROUP) {
			if (list->group.type == GROUP_ATOM)
				return 1;
			if (check_atom(list->group.tokens))
				return 1;
		}
		list = list->next;
	}
	return 0;
}