Package foundry.veil.impl.glsl
Class GlslTokenReader
java.lang.Object
foundry.veil.impl.glsl.GlslTokenReader
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canConsume
(GlslLexer.TokenType token) boolean
canRead()
boolean
canRead
(int length) consume
(GlslLexer.TokenType token) int
int
getCursorOffset
(int cursor) void
void
peek()
peek
(int amount) peekType
(int amount) void
setCursor
(int cursor) void
skip()
void
skip
(int amount) void
toString()
boolean
tryConsume
(GlslLexer.TokenType... tokens)
-
Constructor Details
-
GlslTokenReader
- Throws:
GlslSyntaxException
-
GlslTokenReader
-
-
Method Details
-
getCursorOffset
public int getCursorOffset(int cursor) -
getString
-
canRead
public boolean canRead(int length) -
canRead
public boolean canRead() -
peek
-
peek
-
peekType
-
canConsume
-
consume
- Throws:
GlslSyntaxException
-
tryConsume
-
error
-
throwError
- Throws:
GlslSyntaxException
-
skip
public void skip() -
skip
public void skip(int amount) -
markError
-
markNode
-
getErrors
- Returns:
- All errors marked from reading tokens
-
getCursor
public int getCursor() -
getMarkedNodes
-
setCursor
public void setCursor(int cursor) -
toString
-