diff options
| author | LLLL Colonq <llll@colonq> | 2025-12-19 16:24:15 -0500 |
|---|---|---|
| committer | LLLL Colonq <llll@colonq> | 2025-12-19 16:24:15 -0500 |
| commit | 219c94c7eb7448bfc86602579de3765216888297 (patch) | |
| tree | 04d45285bec04fe0e4e025e90f50dc262384b390 /src/lexer.h | |
| parent | 09435bffe025a96e0d9c3b44ee9c505973b383bd (diff) | |
Update
Diffstat (limited to 'src/lexer.h')
| -rw-r--r-- | src/lexer.h | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/src/lexer.h b/src/lexer.h deleted file mode 100644 index 19f8d71..0000000 --- a/src/lexer.h +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef LEXER_H -#define LEXER_H - -#include "types.h" - -typedef enum { - PIT_LEX_TOKEN_ERROR=-1, - PIT_LEX_TOKEN_EOF=0, - PIT_LEX_TOKEN_LPAREN, - PIT_LEX_TOKEN_RPAREN, - PIT_LEX_TOKEN_DOT, - PIT_LEX_TOKEN_QUOTE, - PIT_LEX_TOKEN_INTEGER_LITERAL, - PIT_LEX_TOKEN_STRING_LITERAL, - PIT_LEX_TOKEN_SYMBOL, - PIT_LEX_TOKEN__SENTINEL -} pit_lex_token; - -typedef struct { - char *input; - i64 len; /* length of input */ - i64 start, end; /* bounds of the current token */ - i64 line, column; /* for error reporting only; current line and column */ - i64 start_line, start_column; /* for error reporting only; line and column of token start */ - char *error; -} pit_lexer; - -void pit_lex_cstr(pit_lexer *ret, char *buf); -void pit_lex_bytes(pit_lexer *ret, char *buf, i64 len); -void pit_lex_file(pit_lexer *ret, char *path); -pit_lex_token pit_lex_next(pit_lexer *st); -const char *pit_lex_token_name(pit_lex_token t); - -#endif |
