mirror of https://github.com/tbklang/tlang.git
BasicLexer
- Documented `isForward()` and `isBackward()` - Made `isBackward()` private
This commit is contained in:
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…
Reference in New Issue