/**
 * @file 语法解析器基类
 * @module transformer/core/ParserBase
 */
import type { MarkdownNode } from "../../transformer/core/MarkdownNode";
import { InlineParseContext } from "../../transformer/core/context/InlineParseContext";
import { RenderContext } from "../../transformer/core/context/RenderContext";
import { BlockParseContext } from "../../transformer/core/context/BlockParseContext";
/** 0-based 半开区间 [startLine, endLine)。 */
export interface LineRange {
    startLine: number;
    endLine: number;
}
export interface InlineParseResult {
    node: MarkdownNode;
    nextIndex: number;
}
export interface BlockParseResult {
    node?: MarkdownNode | null;
    nextIndex: number;
}
/** 单个 parser 的 options */
export type ParserOptions = Record<string, unknown>;
/** TransformerEngine.syntaxOptions 分发结构 */
export type SyntaxOptions = Record<string, ParserOptions>;
/** 行内语法解析器基类 */
export declare abstract class BaseInlineParser {
    readonly type: string;
    /** 强打断：emphasis/strong 预读扫描时跳过（默认 true，如 code span） */
    readonly strongBreak: boolean;
    private options;
    protected constructor(type: string, strongBreak?: boolean);
    setOptions(options: ParserOptions): void;
    clearOptions(): void;
    getOptions(): ParserOptions;
    canOpenAt(src: string, index: number, ctx: InlineParseContext): boolean;
    parse(src: string, index: number, ctx: InlineParseContext): InlineParseResult | null;
    render(node: MarkdownNode, ctx: RenderContext, html?: object): string;
}
/** 块级语法解析器基类 */
export declare abstract class BaseBlockParser {
    readonly type: string;
    /** `syntaxOptions` 中的键；默认与 {@link type} 相同 */
    readonly syntaxKey: string;
    /** 强打断：打断段落 / list 行收集等（默认 true） */
    readonly strongBreak: boolean;
    private options;
    protected constructor(type: string, strongBreak?: boolean, syntaxKey?: string);
    setOptions(options: ParserOptions): void;
    clearOptions(): void;
    getOptions(): ParserOptions;
    /** 轻量级预检：是否可在 index 行开启本语法（禁止写入 store） */
    canOpenAt(lines: string[], index: number, ctx: BlockParseContext): boolean;
    parse(lines: string[], index: number, ctx: BlockParseContext): BlockParseResult | null;
    render(node: MarkdownNode, ctx: RenderContext): string;
    /** 块根元素上的源码行号属性。 */
    protected sourceLineAttrs(node: MarkdownNode): string;
}
//# sourceMappingURL=ParserBase.d.ts.map