Added foundation for Lexer
This commit is contained in:
@@ -6,12 +6,24 @@ namespace LXC::Lexer
|
||||
{
|
||||
struct LexerContext
|
||||
{
|
||||
// Constructor to set the information of the context //
|
||||
LexerContext(const std::string& _source);
|
||||
|
||||
// Trackers for the Lexer itself //
|
||||
std::string source;
|
||||
const std::string& source;
|
||||
size_t index;
|
||||
|
||||
LexerOutput out;
|
||||
const size_t len;
|
||||
|
||||
// Trackers for where the Lexer is within the user version of source //
|
||||
unsigned short column;
|
||||
unsigned short line;
|
||||
};
|
||||
|
||||
struct LexerError
|
||||
{};
|
||||
|
||||
// Turns a file into a vector of tokens //
|
||||
Util::ReturnVal<LexerOutput, LexerError> TokenizeFile(const std::string& fileContents);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user