Package com.io7m.jsx.api.tokens
Interface TokenType
- All Known Implementing Classes:
TokenComment,TokenEOF,TokenLeftParenthesis,TokenLeftSquare,TokenQuotedString,TokenRightParenthesis,TokenRightSquare,TokenSymbol
public sealed interface TokenType
permits TokenComment, TokenEOF, TokenLeftParenthesis, TokenLeftSquare, TokenQuotedString, TokenRightParenthesis, TokenRightSquare, TokenSymbol
The type of tokens.
-
Method Summary
Modifier and TypeMethodDescriptioncom.io7m.jlexing.core.LexicalPosition<URI> lexical()<A,E extends Exception>
AmatchToken(TokenMatcherType<A, E> m) Match a token.
-
Method Details
-
lexical
com.io7m.jlexing.core.LexicalPosition<URI> lexical()- Returns:
- The lexical information for the token
-
matchToken
Match a token.- Type Parameters:
A- The type of values returned by the matcherE- The type of exceptions raised by the matcher- Parameters:
m- The matcher- Returns:
- The value returned by the matcher
- Throws:
E- If the matcher raisesE
-