#ifndef __HF__LEXER_H__ #define __HF__LEXER_H__ #include "location.h" #include "result.h" enum hf__token_type { HF__TOKEN_TYPE__NUMBER, HF__TOKEN_TYPE__CHAR, HF__TOKEN_TYPE__WORD, HF__TOKEN_TYPE__PERIOD_STRING, HF__TOKEN_TYPE__COLON, HF__TOKEN_TYPE__SEMICOLON, HF__TOKEN_TYPE__DASH_COMMENT, HF__TOKEN_TYPE__BACKSLASH_COMMENT, HF__TOKEN_TYPE__PAREN_COMMENT, }; struct hf__token { enum hf__token_type type; struct hf__location location; }; extern void hf__lex(const char *const src, const size_t src_len, struct hf__token **tokens, size_t *const len, size_t *const cap); #endif