Skip to main content

Module parse

Module parse 

Source
Expand description

chumsky-0.10 combinators for the parsed-syntax shape.

Parse impls for ParsedModule/ParsedFunction are generic over the consumer’s instruction type I, source type Ty, and device-header type H.

Functions§

block_i64_flat
Block-body helper: parse a sequence of whitespace-separated i64s as flat rows between an outer { … } provided by the caller. The body itself is a sequence of i64s with any whitespace (including newlines) between them.
block_i64_pairs
Block-body helper: parse rows of i64 i64 pairs separated by whitespace. Within a row the two ints are whitespace-separated; rows themselves are also just whitespace-separated (newlines or other ws — the helper doesn’t require row alignment).
skip
Whitespace and //-to-end-of-line comments. Zero-or-more.
string_literal
"…" with \\, \", \n, \t, \r escape sequences.
symbol_ref
@name — leading @ consumed; name is ident()-shaped.