Skip to main content

Module source_parser

Module source_parser 

Source
Expand description

The injected markup/CSS parser boundary. See SourceParser. Injected source front-end - the markup + CSS parser boundary.

Nothing under the runtime links the .lmn / CSS parser. That front-end stays in the compiler (lumenc), and lumenc depends on the runtime for its CLI run / build paths, so a direct parser dependency here would form a dependency cycle. The parser is injected instead:

  • The CLI (lumenc run), the Rust SDK, and the C-ABI dev paths hand a SourceParser to RunOptions::parser.
  • The dev source-load path and hot reload call it.
  • The precompiled-artifact path needs no parser at all and ignores this hook, which is also every path that runs an app in a browser or on a server.

Structs§

RuntimeParser
World-resource wrapper so an exclusive system (one taking &mut World, which cannot take the parser as a param) can reach the injected SourceParser. Hot reload and set_inner_markup are the two.

Traits§

SourceParser
The markup/CSS front-end, injected by whoever drives the runtime from source. Implemented in lumenc (LumencParser) over its roxmltree markup parser, the hand-rolled CSS parser, the <include> / @import resolver, and the real-filesystem FsLoader.