Implemented .bfuck file reading
This commit is contained in:
16
include/lex.hpp
Normal file
16
include/lex.hpp
Normal 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
|
Reference in New Issue
Block a user