12345678910111213141516171819202122232425262728293031323334353637383940 |
- #ifndef FILE_READER_H
- #define FILE_READER_H
- #ifdef __cplusplus
- extern "C" {
- #endif
- #include "Error.h"
- typedef enum {
- FT_PATH,
- FT_END_PATH,
- FT_NEWLINE,
- FT_LITERAL,
- FT_SINGLE,
- FT_SPACE
- } FileTokenType;
- typedef struct {
- FileTokenType type;
- int single;
- char* literal;
- } FileToken;
- typedef struct {
- FileToken* tokens;
- int capacity;
- int length;
- } FileTokens;
- void ftInit(const char* path, FileTokens* ft, Error* e);
- void ftDelete(FileTokens* ft);
- void ftPrint(FileTokens* ft);
- #ifdef __cplusplus
- }
- #endif
- #endif
|