forked from ground/cground
Initial commit
This commit is contained in:
23
src/lexer.h
Normal file
23
src/lexer.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#ifndef LEXER_H
|
||||
#define LEXER_H
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
typedef struct Token {
|
||||
char* text;
|
||||
} Token;
|
||||
|
||||
typedef struct TokenLine {
|
||||
Token* tokens;
|
||||
size_t count;
|
||||
} TokenLine;
|
||||
|
||||
typedef struct LexedFile {
|
||||
TokenLine* lines;
|
||||
size_t lineCount;
|
||||
} LexedFile;
|
||||
|
||||
LexedFile lexFile(const char* fileContents);
|
||||
void freeLexedFile(LexedFile* lf);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user