Files
MIRROR-LX-OriginalRepo/Lexer/inc/LexerErrors.h
Pasha Bibko 4e78a9f6ae Made Lexer errors fully hidden in global scope
Also improved general ease of use with debugging use __debugbreak when an error is thrown.

NOTE: Parser errors currently crash the program
2025-05-07 16:31:44 +01:00

25 lines
502 B
C++

#pragma once
#include <LX-Common.h>
#include <LexerInfo.h>
namespace LX
{
// Error type with index and character to alert the user that LX does not understand that symbol //
struct InvalidCharInSource : public RuntimeError
{
GENERATE_LX_ERROR_REQUIRED_FUNCTION_DECLARATIONS;
InvalidCharInSource(const LexerInfo& info, const std::string& source, const std::string _file);
std::string lineContents;
std::string file;
std::streamsize col;
std::streamsize line;
char invalid;
};
}