Module hvm::parser

source · []

Structs

Enums

Functions

Like ‘text’, but aborts if there is no match.

Returns true if cursor will be at the end of the file after skipping whitespace and comments.

Evaluates a parser and returns its result, but reverts its effect.

Skips comments and whitespace, then returns the next char, or the null character if this doesn’t exist.

Checks if a dry-run of the first parser returns true. If so, applies the second parser and returns Some. If no, returns None.

Maybe gets the current character.

Evaluates a list-like parser, with an opener, separator, and closer.

Parses a name after skipping comments and whitespace.

Parses a non-empty name after skipping.

Parses a name right after the parsing cursor.

Skips comments and whitespace, then returns the next char, or the null character if this doesn’t exist.

Skips comments and whitespace.

Skips the current character.

Like ‘text_here’, but skips whitespace and comments first.

Attempts to match a string right after the cursor. Returns true if successful. Consumes string.

Evaluates a parser until a condition is met. Returns an array of results.

Type Definitions