What went wrong reading the text: lexing, block structure and expression syntax. Validate adds the save-time rules.
The dialect the SQL is read with.
Whether every tag was read: no unsupported tag or expression, unclosed tag or unclosed block.
The template tree, in source order.
The query text.
The token stream the template was built from.
The parameter assignments to render the template with so every branch's SQL is seen: the
base assignment, and variants as overrides of it: the base first, then one per {% if %}
toggled on its own (n + 1 renders for n blocks).
The {{query:"…"}} compositions, with their arguments and SQL position.
The Context.<Token> values the template reads.
The descriptions written into the template: {# @param / @field #} headers and trailing --: comments.
The parameters: names a caller supplies, with their filters, inferred type, whether required, and every use.
Applies every save-time rule of the MJ Query language. Errors refuse a save; warnings are reported.
StaticParseParses MJ Query text.
The query text, template tags included.
The SQL dialect the query is written in.
A parsed MJ Query template: SQL in one dialect with MJ template tags, read by the MJ Query language v1 (
guides/MJ_QUERY_LANGUAGE.md).The tree (Nodes) is public and read-only. Analyses are methods, computed on first call and kept; each returns an Analysis that says whether it is complete and what it found wrong. Parsing never throws, and every analysis runs in time linear in the text (branch variants are bounded per block).