mirror of
https://github.com/PashaBibko/LX.git
synced 2026-04-04 01:49:05 +00:00
Improved logging
Small errors with logging parser unexpected token errors. Tokens need to be re-written with how they store memory as it can be halved.
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
namespace LX
|
||||
{
|
||||
// Passes the constructor args to the values //
|
||||
Token::Token(const TokenType _type, std::string _contents, std::streamsize _line, std::streamsize _index, std::streamsize _length)
|
||||
: type(_type), contents(_contents), line(_line), index(_index), length(_length)
|
||||
Token::Token(const TokenType _type, const LexerInfo& info, std::string _contents, std::streamsize _length)
|
||||
: type(_type), contents(_contents), index(info.index - _length + 1), line(info.line), column(info.column - _length), length(_length)
|
||||
{}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user