/**
 * Buddy Script Parser
 *
 * Parses tokens into an Abstract Syntax Tree (AST)
 */
import type { Token, ProgramNode } from './types.js';
export declare class Parser {
    private tokens;
    private current;
    private recursionDepth;
    constructor(tokens: Token[]);
    /**
     * Track recursion depth to prevent stack overflow on deeply nested input
     */
    private enterRecursion;
    private exitRecursion;
    parse(): ProgramNode;
    private declaration;
    private variableDeclaration;
    private functionDeclaration;
    private importStatement;
    private statement;
    private ifStatement;
    private whileStatement;
    private forStatement;
    private forCStyleStatement;
    private returnStatement;
    private tryStatement;
    private throwStatement;
    private breakStatement;
    private continueStatement;
    private block;
    private expressionStatement;
    private expression;
    private assignment;
    private ternary;
    private or;
    private and;
    private equality;
    private comparison;
    private term;
    private factor;
    private power;
    private unary;
    private call;
    private finishCall;
    private primary;
    private arrayExpression;
    private objectExpression;
    private arrowFunction;
    private match;
    private check;
    private checkNext;
    private advance;
    private isAtEnd;
    private peek;
    private previous;
    private consume;
    private consumeOptional;
    private synchronize;
}
export declare function parse(tokens: Token[]): ProgramNode;
