1 Lexer API
Valerie Wolfe edited this page 2024-04-03 14:47:32 -04:00

The interpret helper object exposes the Lexing and Parsing API.

Methods

interpret.first(input: str)

Peeks the first token in the input string.

Returns: Token

interpret.input(prompt: str)

An input(prompt: str) wrapper that tokenizes the user input.

Returns: TokenSet

interpret.parse_roll(input: str)

Parses input using the default roll expression parser.

Returns: int

interpret.tokenize(input: str):

Tokenizes a string.

Returns: TokenSet