/** * Aexol Language Parser * * Builds an Abstract Syntax Tree (AST) from a token stream. * Supports the full Aexol language grammar for capability definitions, * workflows, and agent structures. */ import { TokenType } from "./lexer/tokens.js"; import type { Token } from "./lexer/tokens.js"; import type { CapabilityNode, Program } from "./ast/nodes.js"; import type { ParserCursor } from "./parser/cursor.js"; export declare class Parser implements ParserCursor { private tokenizer; currentToken: Token; constructor(source: string); advance(): Token; check(type: TokenType): boolean; checkAny(...types: TokenType[]): boolean; consume(type: TokenType, message?: string): Token; match(...types: TokenType[]): Token | null; consumeIdentifierOrKeyword(message?: string): Token; /** * Check if the current token is a keyword being used as an identifier in a * capability context. Many common English words (import, from, context, etc.) * are reserved keywords in the lexer but should be accepted as-is when they * appear as unquoted capability names (e.g. "can import catalog"). */ isKeywordUsedAsIdentifier(): boolean; skipNewlines(): void; isAtEnd(): boolean; /** * Check for and consume a description (PROMPT token with triple single-quotes) if present */ parseDescriptionIfPresent(): string | undefined; private throwUnexpectedTopLevelToken; /** * Parse the entire program */ parse(): Program; parseCapability(): CapabilityNode; /** * Parse string array: [item1, item2, item3] */ parseStringArray(): string[]; } //# sourceMappingURL=parser.d.ts.map