Skip to main content

Module space_dsl

Module space_dsl 

Expand description

The space-dsl generator: docs/reference/space-dsl.md from the parser’s and the derive’s own documentation.

Two surfaces describe one engine (§7): the string DSL that atune_core::space::dsl parses, and the #[space(...)] attribute grammar that atune_derive expands. Both are already specified — in the module documentation of the code that implements them, which is where a grammar has to live if it is not to drift from the parser. atune_core::space::dsl’s //! carries the form table, the literal rules, the step syntax and the round-trip promise; atune_derive’s carries the attribute table, the type mapping and the list of compile errors. This generator republishes those, rather than a paraphrase of them that a parser change would silently falsify.

Three transformations, and nothing else:

  • rustdoc links become text. An intra-doc link resolves inside rustdoc and nowhere else; published as written it is a target that is not a URL, and mkdocs --strict is right to reject it.
  • headings are demoted. A module’s # Grammar is a top-level heading in rustdoc and would be a second <h1> on a page that already has one.
  • sections are selected by name. A reference page wants the grammar, not the crate’s “do not depend on this directly” note to Rust callers. The wanted headings are named below, and a heading that is not one of them is a fail-closed error rather than a silent omission: a new section of the grammar must be published or deliberately excluded, never dropped by accident.

Structs§

Source 🔒
One source of grammar, and which of its sections the page publishes.
SpaceDsl
Generates the search-space DSL reference page.

Constants§

GENERATOR 🔒
This generator’s name, for fail-closed error messages.
SOURCES 🔒
The two sources, in the order the page presents them.

Functions§

render_source 🔒
Writes one source’s sections.