import { ManifestProgram, CompilationError } from './types'; export declare class Parser { private tokens; private pos; private errors; parse(source: string): { program: ManifestProgram; errors: CompilationError[]; }; private parseUse; private parseModule; private parseEntity; private parseEnum; private parseValueObject; private parseTenant; private parseProperty; /** Parses the parenthesized arg list of `masked(strategy, ...numericParams)`. */ private parseMaskStrategyArgs; private parseTransition; private parseApproval; /** * Parse `cancel` or `escalate { to / status / timeout }`. * Bare `escalate` without a block is recorded as incomplete for compile diagnostics. */ private parseApprovalOnTimeout; private parseApprovalStage; private parseComputedProperty; private parseComputedCache; private extractDependencies; private parseIdentifierArray; private parseRelationship; private parseCommand; private parsePolicy; private parseRole; private parseStore; private parseOutboxEvent; private parseType; private parseBehavior; private parseTrigger; /** * Lookahead to check if the current `on` keyword starts a reaction * (`on Event run ...` or `on Event fanOut ...`) or a behavior * (`on Event { ... }` / `on Event then ...`). */ private isReactionLookahead; /** * Parses an optional `params { name: , ... }` clause shared by all * reaction forms. */ private parseReactionParams; /** * Parses a reaction. Two forms: * * on run . * resolve * params { : , ... } * * on fanOut where = * run * — or — * run . * params { : , ... } * * Same-entity form (`run `) dispatches on every MatchEntity row (legacy). * Cross-entity form (`run Target.cmd`) iterates MatchEntity rows and runs the * command on Target (foreach-create when cmd is `create`). */ private parseReaction; /** * Parses: webhook "" run [Entity.] * [method: "POST"] * [signature { algorithm: "hmac-sha256", header: "X-Sig", secret: "context.secret" }] * [idempotencyHeader: "X-Idempotency-Key"] * [transform: { : , ... }] */ private parseWebhook; /** * Parses: { algorithm: "hmac-sha256", header: "X-Hub-Signature-256", secret: "context.secret" } */ private parseWebhookSignature; /** * Parses: saga { * step { command: Entity.cmd [compensate: Entity.cmd] } * ... * [on_failure: "compensate"|"abort"] * [emit EventName] * } * * Note: 'step' and 'compensate' are NOT keywords — matched as IDENTIFIERs * to avoid breaking existing code that uses 'step' as a property name. */ private parseSaga; private parseSagaStep; private parseAction; /** True when the current token ends the current action (newline, block close, or EOF). */ private atStatementEnd; private parseConstraint; private parseFlow; private parseFlowStep; private parseEffect; private parseExpose; private parseComposition; private parseComponentRef; private parseConnection; private parseExpr; private parseTernary; private parseOr; private parseAnd; private parseEquality; private parseComparison; private parseAdditive; private parseMultiplicative; private parseUnary; private parsePostfix; private parsePrimary; /** * True when the upcoming tokens form the aggregate-count shape * `count ( where ...` — the only form in which the otherwise-free * identifier `count` is treated as the aggregate operator. */ private isAggregateCountLookahead; /** * Parses `count(Entity where field == value, field2 == value2, ...)`. * Every predicate is a pure equality (`==`); predicates are ANDed. At least * one predicate (the foreign-key match) is required — a zero-predicate count * would be an unbounded table scan, the analytics/reporting smell this * primitive deliberately avoids. */ private parseAggregateCount; /** * True when upcoming tokens form `sum ( where ...`. */ private isAggregateSumLookahead; /** * Parses `sum(Entity where field == value, ..., of quantityField)`. */ private parseAggregateSum; private check; /** Lookahead: true if the token `offset` positions ahead is a keyword with the given value. */ private peekIsKeyword; private consume; /** * Consumes a declaration identifier token, enforcing the reserved word rule. * Use this ONLY at declaration sites (entity/module/command/property/parameter names, etc.). * Do NOT use for expression member access or object literal keys. * * If the current token is a KEYWORD (reserved word), emits a structured diagnostic * and returns a placeholder token to allow continued parsing (for better error recovery). */ private consumeIdentifier; /** * Consumes any identifier-like token (IDENTIFIER or KEYWORD) for use in expressions. * This is used for member access properties and object literal keys where keywords are allowed. */ private consumeIdentifierOrKeyword; private parseRetryBlock; private parseSchedule; private parseRateLimitBlock; private advance; private current; private isEnd; private skipNL; private sync; } //# sourceMappingURL=parser.d.ts.map