import type Artist from '../artist/Artist'; import { type ScoreCapacity, type ScoreV2 } from '../score/parse'; /** The original Jison grammar returns an array of syntax elements, or null for comments alone. */ type ParseResult = Language extends 1 ? any[] | null : ScoreV2; /** Parse a fresh ScoreV2 per revision, or explicitly dispatch v1 instructions to an Artist. */ export default class VexTab { static DEBUG: boolean; private valid; private readonly capacity?; private readonly artist?; private readonly compiler?; /** Modern callers can pass the returned document to renderScore, renderScorePart or Player. */ constructor(...mode: Language extends 2 ? [options?: { language?: 2; capacity?: ScoreCapacity; }] : never); /** Fixed engraving uses the original Artist instance and preserves its v1 syntax elements. */ constructor(artist: Artist, options: { language: Language; } & { language: 1; }); /** Clear validity between revisions. A bound Artist keeps its own construction state. */ reset(): void; /** True only after a successful parse since the most recent reset or failed revision. */ isValid(): boolean; /** Return the exact Artist supplied for v1. ScoreV2 parsing constructs no renderer. */ getArtist(): Language extends 1 ? Artist : undefined; /** Return a checked document by default. Errors retain offsets into the original source. */ parse(source?: string): ParseResult; /** Keep the public ParseError and AST shape used by v1 fixed-layout clients. */ private parseFixed; } export {};