Files
LXC/Lexer/inc/Lexer.h
2025-07-20 16:15:58 +01:00

30 lines
597 B
C++

#pragma once
#include <Token.h>
namespace LXC::Lexer
{
struct LexerContext
{
// Constructor to set the information of the context //
LexerContext(const std::string& _source);
// Trackers for the Lexer itself //
const std::string& source;
__int32 index;
LexerOutput out;
const __int32 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);
}