From 2cffbe92b3da759147076f17d38f74870238a244 Mon Sep 17 00:00:00 2001 From: dx Date: Thu, 7 May 2020 02:59:33 +0100 Subject: +token checker function This will check if a given character is a valid plain text token (*, _). This will allow me to abstract away and assess if some plain text needs to be further processed --- Converter/includes/compiler.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Converter/includes/compiler.h') diff --git a/Converter/includes/compiler.h b/Converter/includes/compiler.h index 3b89b49..df9c9b1 100644 --- a/Converter/includes/compiler.h +++ b/Converter/includes/compiler.h @@ -2,9 +2,14 @@ #define __COMPILER_H_ #include +#include typedef char *string; +const static char TOKENS[] = {'*', '_'}; +const static size_t N_TOKENS = 2; + string compile_line(string line, size_t sz_line, string line_or_source); int find_string(string src, string query, size_t sz_src, size_t sz_query); +bool is_token(char c); #endif // __COMPILER_H_ -- cgit v1.2.3-13-gbd6f