blob: 99431ec1a7e361267106ed35b0d061d17e6dfef5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
/*
* Quark lexer (lexical analyzer).
* Turns source code into tokens.
* Copyright (c) 2023-2024, Quinn Stephens and the OSMORA team.
* Provided under the BSD 3-Clause license.
*/
#ifndef _LEXER_H
#define _LEXER_H
#include "lexer/token.h"
struct lexer {
char *pos;
char *line_start;
int line;
};
void lexer_next(struct lexer *ctx, struct token *tok);
void lexer_init(struct lexer *ctx, char *source);
#endif /* !_LEXER_H */
|