{
  "classes": [
    {
      "constants": [],
      "types": [
        {
          "lua_type": "type TCondition = {\n    lhs: AstExpression,\n    cond: string?,\n    rhs: AstExpression?,\n    chain: (\"or\" | \"and\")?,\n}",
          "name": "TCondition",
          "tags": [],
          "source": {
            "path": "",
            "line": 36
          },
          "fields": [
            {
              "lua_type": "lhs: AstExpression",
              "name": "lhs",
              "desc": ""
            },
            {
              "lua_type": "cond: string?",
              "name": "cond",
              "desc": ""
            },
            {
              "lua_type": "rhs: AstExpression?",
              "name": "rhs",
              "desc": ""
            },
            {
              "lua_type": "chain: (\"or\" | \"and\")?",
              "name": "chain",
              "desc": ""
            }
          ],
          "desc": "A single link in a condition chain.\n\n`lhs` is always present; `cond`/`rhs` are present for comparisons;\n`chain` links to the next condition via `\"and\"` or `\"or\"`.\n"
        },
        {
          "lua_type": "type TemplateError = {\n    message: string,\n    line: number,\n    col: number,\n    filepath: string?,\n}",
          "name": "TemplateError",
          "tags": [],
          "source": {
            "path": "",
            "line": 45
          },
          "fields": [
            {
              "lua_type": "message: string",
              "name": "message",
              "desc": ""
            },
            {
              "lua_type": "line: number",
              "name": "line",
              "desc": ""
            },
            {
              "lua_type": "col: number",
              "name": "col",
              "desc": ""
            },
            {
              "lua_type": "filepath: string?",
              "name": "filepath",
              "desc": ""
            }
          ],
          "desc": "A structured error thrown by the parser and evaluator.\n\nContains the human-readable `message` and the source location\n(`line`, `col`) where the error occurred, plus the optional `filepath`\nof the template file that produced the error.\n"
        },
        {
          "lua_type": "type AstEof = {\n    type: \"eof\",\n    line: number,\n    col: number,\n    filepath: string?,\n}",
          "name": "AstEof",
          "tags": [],
          "source": {
            "path": "",
            "line": 59
          },
          "fields": [
            {
              "lua_type": "type: \"eof\"",
              "name": "type",
              "desc": ""
            },
            {
              "lua_type": "line: number",
              "name": "line",
              "desc": ""
            },
            {
              "lua_type": "col: number",
              "name": "col",
              "desc": ""
            },
            {
              "lua_type": "filepath: string?",
              "name": "filepath",
              "desc": ""
            }
          ],
          "desc": "End-of-file sentinel.\n"
        },
        {
          "lua_type": "type AstLiteral = {\n    type: \"literal\",\n    value: string,\n    line: number,\n    col: number,\n    filepath: string?,\n}",
          "name": "AstLiteral",
          "tags": [],
          "source": {
            "path": "",
            "line": 68
          },
          "fields": [
            {
              "lua_type": "type: \"literal\"",
              "name": "type",
              "desc": ""
            },
            {
              "lua_type": "value: string",
              "name": "value",
              "desc": ""
            },
            {
              "lua_type": "line: number",
              "name": "line",
              "desc": ""
            },
            {
              "lua_type": "col: number",
              "name": "col",
              "desc": ""
            },
            {
              "lua_type": "filepath: string?",
              "name": "filepath",
              "desc": ""
            }
          ],
          "desc": "Raw text between template delimiters.\n"
        },
        {
          "lua_type": "type AstExpression = {\n    type: \"expression\",\n    value: { string | { dyn: AstExpression } } | { group: { TCondition } } | number | string | boolean,\n    negate: boolean?,\n    filters: { string },\n    line: number,\n    col: number,\n    filepath: string?,\n}",
          "name": "AstExpression",
          "tags": [],
          "source": {
            "path": "",
            "line": 82
          },
          "fields": [
            {
              "lua_type": "type: \"expression\"",
              "name": "type",
              "desc": ""
            },
            {
              "lua_type": "value: { string | { dyn: AstExpression } } | { group: { TCondition } } | number | string | boolean",
              "name": "value",
              "desc": "Path values are arrays of segments: strings for `.key` access,\nor `{ dyn: AstExpression }` tables for `[expr]` subscript access."
            },
            {
              "lua_type": "negate: boolean?",
              "name": "negate",
              "desc": ""
            },
            {
              "lua_type": "filters: { string }",
              "name": "filters",
              "desc": ""
            },
            {
              "lua_type": "line: number",
              "name": "line",
              "desc": ""
            },
            {
              "lua_type": "col: number",
              "name": "col",
              "desc": ""
            },
            {
              "lua_type": "filepath: string?",
              "name": "filepath",
              "desc": ""
            }
          ],
          "desc": "An interpolated expression: `{{ value }}` or `{{ value | filter }}`.\n\n`value` is either an array of path segments (e.g. `{\"user\", \"name\"}`)\nfor dotted variable access, a number literal, or a double-quoted\nstring literal (with `\\n`, `\\t`, `\\r`, `\\\\`, `\\\"` escapes).\n"
        },
        {
          "lua_type": "type AstStatementEnd = {\n    type: \"end\",\n    line: number,\n    col: number,\n    filepath: string?,\n}",
          "name": "AstStatementEnd",
          "tags": [],
          "source": {
            "path": "",
            "line": 96
          },
          "fields": [
            {
              "lua_type": "type: \"end\"",
              "name": "type",
              "desc": ""
            },
            {
              "lua_type": "line: number",
              "name": "line",
              "desc": ""
            },
            {
              "lua_type": "col: number",
              "name": "col",
              "desc": ""
            },
            {
              "lua_type": "filepath: string?",
              "name": "filepath",
              "desc": ""
            }
          ],
          "desc": "Marks the end of a control-flow block (`{% end %}`).\n"
        },
        {
          "lua_type": "type AstStatementElse = {\n    type: \"else\",\n    body: AstSuite,\n    line: number,\n    col: number,\n    filepath: string?,\n}",
          "name": "AstStatementElse",
          "tags": [],
          "source": {
            "path": "",
            "line": 105
          },
          "fields": [
            {
              "lua_type": "type: \"else\"",
              "name": "type",
              "desc": ""
            },
            {
              "lua_type": "body: AstSuite",
              "name": "body",
              "desc": ""
            },
            {
              "lua_type": "line: number",
              "name": "line",
              "desc": ""
            },
            {
              "lua_type": "col: number",
              "name": "col",
              "desc": ""
            },
            {
              "lua_type": "filepath: string?",
              "name": "filepath",
              "desc": ""
            }
          ],
          "desc": "The fallback branch of an if/elseif chain (`{% else %}`).\n"
        },
        {
          "lua_type": "type AstStatementElseIf = {\n    type: \"elseif\",\n    conditionChain: { TCondition },\n    body: AstSuite,\n    next: AstStatementElseIf | AstStatementElse | AstStatementEnd,\n    line: number,\n    col: number,\n    filepath: string?,\n}",
          "name": "AstStatementElseIf",
          "tags": [],
          "source": {
            "path": "",
            "line": 115
          },
          "fields": [
            {
              "lua_type": "type: \"elseif\"",
              "name": "type",
              "desc": ""
            },
            {
              "lua_type": "conditionChain: { TCondition }",
              "name": "conditionChain",
              "desc": ""
            },
            {
              "lua_type": "body: AstSuite",
              "name": "body",
              "desc": ""
            },
            {
              "lua_type": "next: AstStatementElseIf | AstStatementElse | AstStatementEnd",
              "name": "next",
              "desc": ""
            },
            {
              "lua_type": "line: number",
              "name": "line",
              "desc": ""
            },
            {
              "lua_type": "col: number",
              "name": "col",
              "desc": ""
            },
            {
              "lua_type": "filepath: string?",
              "name": "filepath",
              "desc": ""
            }
          ],
          "desc": "An `{% elseif cond then %}` branch, with its own condition and body.\n"
        },
        {
          "lua_type": "type AstStatementIf = {\n    type: \"if\",\n    conditionChain: { TCondition },\n    body: AstSuite,\n    next: AstStatementElseIf | AstStatementElse | AstStatementEnd,\n    line: number,\n    col: number,\n    filepath: string?,\n}",
          "name": "AstStatementIf",
          "tags": [],
          "source": {
            "path": "",
            "line": 127
          },
          "fields": [
            {
              "lua_type": "type: \"if\"",
              "name": "type",
              "desc": ""
            },
            {
              "lua_type": "conditionChain: { TCondition }",
              "name": "conditionChain",
              "desc": ""
            },
            {
              "lua_type": "body: AstSuite",
              "name": "body",
              "desc": ""
            },
            {
              "lua_type": "next: AstStatementElseIf | AstStatementElse | AstStatementEnd",
              "name": "next",
              "desc": ""
            },
            {
              "lua_type": "line: number",
              "name": "line",
              "desc": ""
            },
            {
              "lua_type": "col: number",
              "name": "col",
              "desc": ""
            },
            {
              "lua_type": "filepath: string?",
              "name": "filepath",
              "desc": ""
            }
          ],
          "desc": "The opening `{% if cond then %}` of a conditional chain.\n"
        },
        {
          "lua_type": "type AstStatementForTable = {\n    type: \"forTable\",\n    var1: string,\n    var2: string,\n    items: AstExpression,\n    body: AstSuite,\n    line: number,\n    col: number,\n    filepath: string?,\n}",
          "name": "AstStatementForTable",
          "tags": [],
          "source": {
            "path": "",
            "line": 139
          },
          "fields": [
            {
              "lua_type": "type: \"forTable\"",
              "name": "type",
              "desc": ""
            },
            {
              "lua_type": "var1: string",
              "name": "var1",
              "desc": ""
            },
            {
              "lua_type": "var2: string",
              "name": "var2",
              "desc": ""
            },
            {
              "lua_type": "items: AstExpression",
              "name": "items",
              "desc": ""
            },
            {
              "lua_type": "body: AstSuite",
              "name": "body",
              "desc": ""
            },
            {
              "lua_type": "line: number",
              "name": "line",
              "desc": ""
            },
            {
              "lua_type": "col: number",
              "name": "col",
              "desc": ""
            },
            {
              "lua_type": "filepath: string?",
              "name": "filepath",
              "desc": ""
            }
          ],
          "desc": "A key/value for-in loop: `{% for k, v in expr do %}`.\n"
        },
        {
          "lua_type": "type AstStatementForNumber = {\n    type: \"forNumber\",\n    var: string,\n    start: AstExpression,\n    end_: AstExpression,\n    body: AstSuite,\n    line: number,\n    col: number,\n    filepath: string?,\n}",
          "name": "AstStatementForNumber",
          "tags": [],
          "source": {
            "path": "",
            "line": 152
          },
          "fields": [
            {
              "lua_type": "type: \"forNumber\"",
              "name": "type",
              "desc": ""
            },
            {
              "lua_type": "var: string",
              "name": "var",
              "desc": ""
            },
            {
              "lua_type": "start: AstExpression",
              "name": "start",
              "desc": ""
            },
            {
              "lua_type": "end_: AstExpression",
              "name": "end_",
              "desc": ""
            },
            {
              "lua_type": "body: AstSuite",
              "name": "body",
              "desc": ""
            },
            {
              "lua_type": "line: number",
              "name": "line",
              "desc": ""
            },
            {
              "lua_type": "col: number",
              "name": "col",
              "desc": ""
            },
            {
              "lua_type": "filepath: string?",
              "name": "filepath",
              "desc": ""
            }
          ],
          "desc": "A numeric for loop: `{% for i = start, end do %}`.\n"
        },
        {
          "lua_type": "type AstMacro = {\n    type: \"macro\",\n    name: string,\n    args: { string },\n    body: AstSuite,\n    line: number,\n    col: number,\n    filepath: string?,\n}",
          "name": "AstMacro",
          "tags": [],
          "source": {
            "path": "",
            "line": 169
          },
          "fields": [
            {
              "lua_type": "type: \"macro\"",
              "name": "type",
              "desc": ""
            },
            {
              "lua_type": "name: string",
              "name": "name",
              "desc": ""
            },
            {
              "lua_type": "args: { string }",
              "name": "args",
              "desc": ""
            },
            {
              "lua_type": "body: AstSuite",
              "name": "body",
              "desc": ""
            },
            {
              "lua_type": "line: number",
              "name": "line",
              "desc": ""
            },
            {
              "lua_type": "col: number",
              "name": "col",
              "desc": ""
            },
            {
              "lua_type": "filepath: string?",
              "name": "filepath",
              "desc": ""
            }
          ],
          "desc": "A macro definition: `{% macro name(arg1, arg2) %} body {% end %}`.\n\nDeclares a reusable template block. The macro is registered in the\nevaluation context and can be invoked via [[AstMacroCall]].\n"
        },
        {
          "lua_type": "type AstMacroCall = {\n    type: \"macroCall\",\n    name: string,\n    args: { AstExpression },\n    body: AstSuite,\n    line: number,\n    col: number,\n    filepath: string?,\n}",
          "name": "AstMacroCall",
          "tags": [],
          "source": {
            "path": "",
            "line": 186
          },
          "fields": [
            {
              "lua_type": "type: \"macroCall\"",
              "name": "type",
              "desc": ""
            },
            {
              "lua_type": "name: string",
              "name": "name",
              "desc": ""
            },
            {
              "lua_type": "args: { AstExpression }",
              "name": "args",
              "desc": ""
            },
            {
              "lua_type": "body: AstSuite",
              "name": "body",
              "desc": ""
            },
            {
              "lua_type": "line: number",
              "name": "line",
              "desc": ""
            },
            {
              "lua_type": "col: number",
              "name": "col",
              "desc": ""
            },
            {
              "lua_type": "filepath: string?",
              "name": "filepath",
              "desc": ""
            }
          ],
          "desc": "A macro invocation: `{% use name(expr, ...) %} body {% end %}`.\n\nCalls a previously defined macro. Positional arguments are evaluated\nand bound to the macro's parameter names. The body between `{% use %}`\nand `{% end %}` is rendered and made available to the macro as the\n`\"default\"` slot.\n"
        },
        {
          "lua_type": "type AstSlot = {\n    type: \"slot\",\n    name: string,\n    body: AstSuite,\n    line: number,\n    col: number,\n    filepath: string?,\n}",
          "name": "AstSlot",
          "tags": [],
          "source": {
            "path": "",
            "line": 203
          },
          "fields": [
            {
              "lua_type": "type: \"slot\"",
              "name": "type",
              "desc": ""
            },
            {
              "lua_type": "name: string",
              "name": "name",
              "desc": ""
            },
            {
              "lua_type": "body: AstSuite",
              "name": "body",
              "desc": ""
            },
            {
              "lua_type": "line: number",
              "name": "line",
              "desc": ""
            },
            {
              "lua_type": "col: number",
              "name": "col",
              "desc": ""
            },
            {
              "lua_type": "filepath: string?",
              "name": "filepath",
              "desc": ""
            }
          ],
          "desc": "A slot placeholder inside a macro body: `{% slot name %} default {% end %}`.\n\nWhen the macro is called, the slot is replaced by the caller's\ncorresponding `{% fill name %}` content. If no fill is provided, the\nslot's own body is rendered as a default. The name `\"default\"` is\nreserved for the caller's top-level body.\n"
        },
        {
          "lua_type": "type AstSlotAssign = {\n    type: \"slotAssign\",\n    name: string,\n    body: AstSuite,\n    line: number,\n    col: number,\n    filepath: string?,\n}",
          "name": "AstSlotAssign",
          "tags": [],
          "source": {
            "path": "",
            "line": 216
          },
          "fields": [
            {
              "lua_type": "type: \"slotAssign\"",
              "name": "type",
              "desc": ""
            },
            {
              "lua_type": "name: string",
              "name": "name",
              "desc": ""
            },
            {
              "lua_type": "body: AstSuite",
              "name": "body",
              "desc": ""
            },
            {
              "lua_type": "line: number",
              "name": "line",
              "desc": ""
            },
            {
              "lua_type": "col: number",
              "name": "col",
              "desc": ""
            },
            {
              "lua_type": "filepath: string?",
              "name": "filepath",
              "desc": ""
            }
          ],
          "desc": "A slot fill inside a macro call: `{% fill name %} content {% end %}`.\n\nProvides content for the named [[AstSlot]] in the invoked macro.\n"
        },
        {
          "lua_type": "type AstIncluded = {\n    type: \"included\",\n    path: string,\n    body: AstSuite,\n    passed: AstSuite,\n    line: number,\n    col: number,\n    filepath: string?,\n}",
          "name": "AstIncluded",
          "tags": [],
          "source": {
            "path": "",
            "line": 231
          },
          "fields": [
            {
              "lua_type": "type: \"included\"",
              "name": "type",
              "desc": ""
            },
            {
              "lua_type": "path: string",
              "name": "path",
              "desc": ""
            },
            {
              "lua_type": "body: AstSuite",
              "name": "body",
              "desc": ""
            },
            {
              "lua_type": "passed: AstSuite",
              "name": "passed",
              "desc": ""
            },
            {
              "lua_type": "line: number",
              "name": "line",
              "desc": ""
            },
            {
              "lua_type": "col: number",
              "name": "col",
              "desc": ""
            },
            {
              "lua_type": "filepath: string?",
              "name": "filepath",
              "desc": ""
            }
          ],
          "desc": "An inlined template file: `{% include \"path\" %}`.\n\nAt parse time the referenced file is read and recursively parsed.\nThe resolved AST is stored in `body`. The path is resolved relative\nto the directory of the file currently being parsed.\n"
        },
        {
          "lua_type": "type AstSet = {\n    type: \"set\",\n    name: string,\n    value: AstExpression,\n}",
          "name": "AstSet",
          "tags": [],
          "source": {
            "path": "",
            "line": 241
          },
          "fields": [
            {
              "lua_type": "type: \"set\"",
              "name": "type",
              "desc": ""
            },
            {
              "lua_type": "name: string",
              "name": "name",
              "desc": ""
            },
            {
              "lua_type": "value: AstExpression",
              "name": "value",
              "desc": ""
            }
          ],
          "desc": ""
        },
        {
          "lua_type": "type AstNode = AstLiteral\n    | AstExpression\n    | AstStatementIf\n    | AstStatementElseIf\n    | AstStatementElse\n    | AstStatementEnd\n    | AstStatementForTable\n    | AstStatementForNumber\n    | AstMacro\n    | AstMacroCall\n    | AstSlot\n    | AstSlotAssign\n    | AstIncluded\n    | AstSet\n    | AstEof",
          "name": "AstNode",
          "tags": [],
          "source": {
            "path": "",
            "line": 250
          },
          "fields": [],
          "desc": "Union of all possible AST node types the parser can produce.\n"
        },
        {
          "lua_type": "type AstSuite = { AstNode }",
          "name": "AstSuite",
          "tags": [],
          "source": {
            "path": "",
            "line": 266
          },
          "fields": [],
          "desc": ""
        }
      ],
      "name": "@eryx/template/parser",
      "tags": [],
      "functions": [],
      "properties": [],
      "source": {
        "path": "",
        "line": 0
      },
      "desc": ""
    },
    {
      "is_primary_export": true,
      "source": {
        "path": "",
        "line": 281
      },
      "tags": [],
      "properties": [
        {
          "tags": [],
          "lua_type": "cursor: number",
          "name": "cursor",
          "desc": ""
        },
        {
          "tags": [],
          "lua_type": "line: number",
          "name": "line",
          "desc": ""
        },
        {
          "tags": [],
          "lua_type": "source: string",
          "name": "source",
          "desc": ""
        },
        {
          "tags": [],
          "lua_type": "filepath: string?",
          "name": "filepath",
          "desc": ""
        }
      ],
      "desc": "",
      "name": "Parser",
      "functions": [
        {
          "source": {
            "path": "",
            "line": 295
          },
          "is_method": false,
          "signature": "Parser.new(\n    source: string,  -- The template source to parse.\n    filepath: string?  -- Optional file path of the template, used for resolving `{% include %}` paths.\n) → (\n    Parser  -- A new parser instance. \n)",
          "owner": "Parser",
          "desc": "Creates a new Parser for the given template source string.\n",
          "tags": [],
          "name": "new",
          "return_str": "Parser",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "Parser",
              "desc": "A new parser instance. "
            }
          ],
          "params": [
            {
              "lua_type": "string",
              "name": "source",
              "desc": "The template source to parse."
            },
            {
              "lua_type": "string?",
              "name": "filepath",
              "desc": "Optional file path of the template, used for resolving `{% include %}` paths."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 304
          },
          "is_method": true,
          "signature": "Parser:cur(n: number?) → string",
          "owner": "Parser",
          "desc": "",
          "tags": [],
          "name": "cur",
          "return_str": "string",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "string",
              "desc": ""
            }
          ],
          "params": [
            {
              "lua_type": "number?",
              "name": "n",
              "desc": ""
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 307
          },
          "is_method": true,
          "signature": "Parser:tryConsume(match: string) → boolean",
          "owner": "Parser",
          "desc": "",
          "tags": [],
          "name": "tryConsume",
          "return_str": "boolean",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "boolean",
              "desc": ""
            }
          ],
          "params": [
            {
              "lua_type": "string",
              "name": "match",
              "desc": ""
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 314
          },
          "is_method": true,
          "signature": "Parser:consume(match: string) → ()",
          "owner": "Parser",
          "desc": "",
          "tags": [],
          "name": "consume",
          "return_str": "",
          "function_type": "Method",
          "returns": [],
          "params": [
            {
              "lua_type": "string",
              "name": "match",
              "desc": ""
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 321
          },
          "is_method": true,
          "signature": "Parser:skipWhitespace() → ()",
          "owner": "Parser",
          "desc": "",
          "tags": [],
          "name": "skipWhitespace",
          "return_str": "()",
          "function_type": "Method",
          "returns": [],
          "params": []
        },
        {
          "source": {
            "path": "",
            "line": 339
          },
          "is_method": true,
          "signature": "Parser:pos() → (number, number)",
          "owner": "Parser",
          "desc": "Returns the `(line, col)` of the current cursor position by scanning\nfrom the start of the source string.\n\nO(n) in the number of characters consumed so far. Only called when\ncreating AST nodes or when an error is about to be raised, so the\ncost is negligible in practice.\n",
          "tags": [],
          "name": "pos",
          "return_str": "(number, number)",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "number",
              "desc": ""
            },
            {
              "lua_type": "number",
              "desc": ""
            }
          ],
          "params": []
        },
        {
          "source": {
            "path": "",
            "line": 352
          },
          "is_method": true,
          "signature": "Parser:consumeName() → string",
          "owner": "Parser",
          "desc": "",
          "tags": [],
          "name": "consumeName",
          "return_str": "string",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "string",
              "desc": ""
            }
          ],
          "params": []
        },
        {
          "source": {
            "path": "",
            "line": 379
          },
          "is_method": true,
          "signature": "Parser:consumeExpr() → (\n    AstExpression  -- The parsed expression node. \n)",
          "owner": "Parser",
          "desc": "Consumes an expression: either a numeric literal (integer or decimal)\nor a dotted identifier path (e.g. `user.profile.name`), optionally\nfollowed by one or more pipe-separated filter names.\n",
          "tags": [],
          "name": "consumeExpr",
          "return_str": "AstExpression",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "AstExpression",
              "desc": "The parsed expression node. "
            }
          ],
          "params": []
        },
        {
          "source": {
            "path": "",
            "line": 529
          },
          "is_method": true,
          "signature": "Parser:consumeCondition() → (\n    { TCondition }  -- The parsed condition chain. \n)",
          "owner": "Parser",
          "desc": "Consumes a full condition chain used in `{% if %}` / `{% elseif %}`.\n\nEach link is an expression optionally compared to another via a\nrelational operator (`==`, `~=`, `<`, `>`, `<=`, `>=`), and links\nare joined by `and` or `or`.\n",
          "tags": [],
          "name": "consumeCondition",
          "return_str": "{ TCondition }",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "{ TCondition }",
              "desc": "The parsed condition chain. "
            }
          ],
          "params": []
        },
        {
          "source": {
            "path": "",
            "line": 591
          },
          "is_method": true,
          "signature": "Parser:consumeStmt() → (\n    AstNode  -- The parsed statement node. \n)",
          "owner": "Parser",
          "desc": "Consumes a statement block opened by `{%`.\n\nDispatches to the appropriate handler based on the keyword:\n`if`, `elseif`, `else`, `for`, `end`, `macro`, `use`, `slot`,\n`fill`, or `include`.\n",
          "tags": [],
          "name": "consumeStmt",
          "return_str": "AstNode",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "AstNode",
              "desc": "The parsed statement node. "
            }
          ],
          "params": []
        },
        {
          "source": {
            "path": "",
            "line": 916
          },
          "is_method": true,
          "signature": "Parser:consumeComment() → nil",
          "owner": "Parser",
          "desc": "Consumes a comment block (`{# ... #}`).\n\nAdvances the cursor past the closing `#}` and returns `nil` (no AST\nnode is produced).\n",
          "tags": [],
          "name": "consumeComment",
          "return_str": "nil",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "nil",
              "desc": ""
            }
          ],
          "params": []
        },
        {
          "source": {
            "path": "",
            "line": 945
          },
          "is_method": true,
          "signature": "Parser:consumeUntil(\n    match: { string }  -- An array of node type strings to stop at.\n) → (\n    AstSuite,  -- The body nodes collected before the match.\n    AstNode  -- The terminating node. \n)",
          "owner": "Parser",
          "desc": "Parses nodes until a node whose type is in `match` is encountered.\n\nReturns the collected body nodes and the terminating node. Errors if\nEOF is reached before finding a match.\n",
          "tags": [],
          "name": "consumeUntil",
          "return_str": "(AstSuite, AstNode)",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "AstSuite",
              "desc": "The body nodes collected before the match."
            },
            {
              "lua_type": "AstNode",
              "desc": "The terminating node. "
            }
          ],
          "params": [
            {
              "lua_type": "{ string }",
              "name": "match",
              "desc": "An array of node type strings to stop at."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 976
          },
          "is_method": true,
          "signature": "Parser:next() → (\n    AstNode?  -- The next node, or `nil` for comments. \n)",
          "owner": "Parser",
          "desc": "Produces the next AST node from the source.\n\nDetermines whether the next significant token is an expression\n(`{{`), statement (`{%`), comment (`{#`), or plain literal text,\nand delegates accordingly.\n",
          "tags": [],
          "name": "next",
          "return_str": "AstNode?",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "AstNode?",
              "desc": "The next node, or `nil` for comments. "
            }
          ],
          "params": []
        }
      ],
      "metamethods": [],
      "types": []
    }
  ]
}