xast
Version:
AST parsing library
24 lines (23 loc) • 791 B
TypeScript
interface EscapeSequence {
value: string;
size: number;
}
interface LocationOffset {
line: number;
column: number;
}
export declare class Source {
body: string;
name: string;
locationOffset: LocationOffset;
static isSource(source: unknown): source is Source;
constructor(body: string, name?: string, locationOffset?: LocationOffset);
get [Symbol.toStringTag](): string;
readDigits(start: number, firstCode: number): number;
readEscapedCharacter(position: number): EscapeSequence;
readEscapedUnicodeFixedWidth(position: number): EscapeSequence;
readEscapedUnicodeVariableWidth(position: number): EscapeSequence;
printCodePointAt(position: number): string;
syntaxError(position: number, description: string): Error;
}
export {};