1

Implemented .bfuck file reading

This commit is contained in:
2024-01-18 21:12:40 +01:00
parent ea32025792
commit 98215c5ad6
2 changed files with 63 additions and 0 deletions

16
include/lex.hpp Normal file
View File

@ -0,0 +1,16 @@
#ifndef __LEX_H_
#define __LEX_H_
#include <string>
/**
* @brief Lex a brainfuck file to a string from disk. Each element is a token.
* @param path The path to the file to be lexed
* @param tokens The string where the tokens will be written to
* @return True if the file was lexed successfully
*/
bool lex_brainfuck_file(const std::string &path, std::string &tokens);
bool token_string_valid(std::string_view tokens);
#endif