aboutsummaryrefslogtreecommitdiff
path: root/src/parser.c
blob: e4d02512f24bf93339fb3ba42f81eade7f51a4b2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <def.h>
#include <parser.h>
#include <stdio.h>
#include <string.h>

#define PEEK(hay, needle) (strcmp(hay, needle) == 0)

u8 parse(char *buf, u32 size)
{
	u32 line = 0;

	for (u32 i = 0; i < size; i++) {
		/* printf("'%c'\n", buf[i]); */
		if (buf[i] == '\0')
			break;

		if (buf[i] == '\n') {
			line++;
			continue;
		}
	}

	return 1;
}