- Added a TODO about a possible refactor to make things split out more
- Implemented `setCursor(ulong)` so that we can update the position of the token pointer
This commit is contained in:
Tristan B. Velloza Kildaire 2023-02-15 13:13:42 +02:00
parent 03a998bae8
commit 37225c8484
1 changed files with 6 additions and 0 deletions

View File

@ -19,6 +19,7 @@ import tlang.compiler.parsing.exceptions;
bool isUnitTest;
// TODO: Technically we could make a core parser etc
public final class Parser
{
/**
@ -103,6 +104,11 @@ public final class Parser
tokenPtr--;
}
private void setCursor(ulong newPosition)
{
tokenPtr = newPosition;
}
/**
* Parses if statements
*