import { TokenStream } from '../classes/TokenStream'; import { Token } from '../classes/Lexer'; import { DecoratorCall } from '../types/Ast.type'; export interface DecoratorParserContext { parseStatement: (stream: TokenStream) => any; parseComment: (stream: TokenStream) => any; } /** * Parse a decorator call * Expects stream to be positioned at the '@' decorator token * * @param stream - TokenStream positioned at the decorator token * @param context - Context with helper methods * @returns Parsed DecoratorCall or null if not a decorator */ export declare function parseDecorator(stream: TokenStream, context: DecoratorParserContext): DecoratorCall | null; /** * Parse multiple decorators that appear before a statement * Decorators must be on consecutive lines (or same line) before the target statement * * @param stream - TokenStream positioned at the first decorator (or the statement if no decorators) * @param context - Context with helper methods * @returns Array of parsed decorators, the position after the last decorator, and the next token */ export declare function parseDecorators(stream: TokenStream, context: DecoratorParserContext): { decorators: DecoratorCall[]; positionAfter: number; nextToken: Token | null; };