blob: d693354feeaf36a90e23899d5f19f664b65f93bc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#ifndef CMONKEY_LEXER_H
#define CMONKEY_LEXER_H
#include "slice.h"
#include "token.h"
#include <sys/types.h>
struct lexer {
const char *input;
size_t len;
struct slice word;
};
struct lexer *lexer_new();
void lexer_reset(struct lexer *, const char *input);
void lexer_read_char(struct lexer *);
struct token lexer_next_token(struct lexer *);
void lexer_destroy(struct lexer *);
#endif
|