import { TokenStream } from '../classes/TokenStream'; import { Token } from '../classes/Lexer'; import { CodePosition, Statement } from '../types/Ast.type'; export interface BracketParserContext { /** * Parse a statement from the stream */ parseStatement: (stream: TokenStream) => Statement | null; /** * Create code position from tokens */ createCodePosition: (startToken: Token, endToken: Token) => CodePosition; } export declare class BracketParser { /** * Parse a parenthesized block from TokenStream * Expects stream to be positioned at the '(' token * Syntax: ( ... ) * * @param stream - TokenStream positioned at the '(' token * @param context - Context with helper methods * @returns Array of statements inside the parentheses */ static parse(stream: TokenStream, context: BracketParserContext): Statement[]; /** * Check if the current token is the start of a bracket * @param stream - TokenStream to check * @returns true if current token is LPAREN */ static isBracket(stream: TokenStream): boolean; }