BasicLexer

- Documented `isForward()` and `isBackward()`
- Made `isBackward()` private
feature/lexer_improvements
Tristan B. V. Kildaire 5 months ago
parent 98784847c7
commit 4286b11250

@ -148,12 +148,30 @@ public final class BasicLexer : LexerInterface
this.sourceCode = sourceCode;
}
/**
* Checks whether or not we could shift our
* source text pointer forward if it would
* be within the boundries of the source text
* or not
*
* Returns: `true` if within the boundries,
* `false` otherwise
*/
private bool isForward()
{
return position + 1 < sourceCode.length;
}
public bool isBackward()
/**
* Checks whether or not we could shift our
* source text pointer backwards and it it
* would be within the boundries of the source
* text or not
*
* Returns: `true` if within the boundries,
* `false` otherwise
*/
private bool isBackward()
{
return position - 1 < sourceCode.length;
}

Loading…
Cancel
Save