scriptlang: rember to save last token
This commit is contained in:
parent
f7077274fe
commit
ca6fde3c0b
@ -107,9 +107,11 @@ private:
|
|||||||
-> Result<TokenTypes, void>;
|
-> Result<TokenTypes, void>;
|
||||||
|
|
||||||
[[nodiscard]] auto constexpr inline token(
|
[[nodiscard]] auto constexpr inline token(
|
||||||
TokenTypes type, size_t begin) const noexcept -> Token
|
TokenTypes type, size_t begin) noexcept -> Token
|
||||||
{
|
{
|
||||||
return Token { type, begin, index - begin, line, column };
|
auto token = Token { type, begin, index - begin, line, column };
|
||||||
|
last_token = token;
|
||||||
|
return token;
|
||||||
}
|
}
|
||||||
[[nodiscard]] auto constexpr inline done() const noexcept -> bool
|
[[nodiscard]] auto constexpr inline done() const noexcept -> bool
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user