Expand description
Where a parse happens: one parser, and the queries compiled against it.
Configs live here rather than on Lang because a wasm Language belongs
to the WasmStore its parser holds — parser.c dispatches every lex and
external-scanner call through that store — so a config compiled for one
parser cannot be shared with another.
An injected language’s config must already be in Session::configs when
the parse starts: the callback holds configs immutably and cannot compile
into it. Session::ensure walks the #set! injection.language names of a
query before parsing and compiles each. An injection that names its language
through a captured node instead — the language is in the source text — is
only painted if that language was already compiled.
Structs§
- Session
- A parser and its compiled queries.
Functions§
- with
- Run
fagainst this thread’s session.