Expand description
Multi-format IDL parsing: turn YAML, JSON, or TOML source text into an
Api.
parse_api_str is the entry point. On failure it returns a ParseError
that carries the source text and, where available, a miette span, so the
CLI can render a caret-annotated diagnostic at the offending line and column.
Enums§
- Parse
Error - Everything that can go wrong while turning IDL source text into an
Api.
Functions§
- line_
col_ to_ offset - Convert a 1-indexed
(line, col)pair into a 0-indexed byte offset withinsrc. Returns0when either coordinate is0(i.e., unknown), and clamps tosrc.len()when the requested location is past the end. - parse_
api_ str - Parse IDL source text in the given format into an
Api.