Class Lexer
java.lang.Object
meteordevelopment.starscript.compiler.Lexer
Takes starscript source code and produces a stream or tokens that are used for parsing.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
token
The type of the token. -
lexeme
The string representation of the token. -
line
public int line -
character
public int character -
ch
public char ch -
start
public int start -
current
public int current
-
-
Constructor Details
-
Lexer
-
-
Method Details
-
next
public void next()Scans for next token storing it intokenandlexeme. ProducesToken.EOFif the end of source code has been reached andToken.Errorif there has been an error.
-