import type { ClientStatement, ParsedPath, PlurnkStatement, Position } from "./types.ts"; import type { ClientStatementContext, StatementContext, MidStatementContext } from "./generated/plurnkParser.ts"; import { PlanStatementContext, SendStatementContext } from "./generated/plurnkParser.ts"; declare module "xpath" { function parse(expression: string): unknown; } export default class AstBuilder { #private; static build(ctx: StatementContext | MidStatementContext | PlanStatementContext | SendStatementContext): PlurnkStatement; static buildClient(ctx: ClientStatementContext): ClientStatement; /** * Parse a path string into a ParsedPath, mirroring how the AST visitor * decomposes path slots inside HEREDOC statements. Public for consumers * (RPC layers, scheme handlers) that need to honor the grammar's * authority-vs-opaque cleavage without round-tripping through a fake * HEREDOC. Returns null when `raw` is empty. Throws PlurnkParseError * when `raw` starts with `scheme://` but WHATWG URL rejects it. */ static parsePath(raw: string, pos?: Position): ParsedPath | null; } //# sourceMappingURL=AstBuilder.d.ts.map