Package team.unnamed.mocha.lexer
Class Cursor
java.lang.Object
team.unnamed.mocha.lexer.Cursor
- All Implemented Interfaces:
Cloneable
Mutable class that tracks the position of characters
when performing lexical analysis
Can be used to show the position of lexical errors in a human-readable way
- Since:
- 3.0.0
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Cursor
public Cursor(int line, int column) -
Cursor
public Cursor()
-
-
Method Details
-
index
public int index() -
line
public int line() -
column
public int column() -
push
public void push(int character) -
clone
-
toString
-
equals
-
hashCode
public int hashCode()
-