frontend/.pnpm-store/v3/files/c4/b6cc061a195f1f23ed94927888070b2ac0ab1cc5e618a7488e4db5192896863063f85d6da8f79988076a6c1c0b8aabda6c1b7cff1a2f258634e85f86d23747

36 lines
1.1 KiB
Plaintext

import { TemplateNode, Ast, ParserOptions, Fragment, Style, Script } from '../interfaces';
interface LastAutoClosedTag {
tag: string;
reason: string;
depth: number;
}
export declare class Parser {
readonly template: string;
readonly filename?: string;
readonly customElement: boolean;
index: number;
stack: TemplateNode[];
html: Fragment;
css: Style[];
js: Script[];
meta_tags: {};
last_auto_closed_tag?: LastAutoClosedTag;
constructor(template: string, options: ParserOptions);
current(): TemplateNode;
acorn_error(err: any): void;
error({ code, message }: {
code: string;
message: string;
}, index?: number): void;
eat(str: string, required?: boolean, message?: string): boolean;
match(str: string): boolean;
match_regex(pattern: RegExp): string;
allow_whitespace(): void;
read(pattern: RegExp): string;
read_identifier(allow_reserved?: boolean): string;
read_until(pattern: RegExp): string;
require_whitespace(): void;
}
export default function parse(template: string, options?: ParserOptions): Ast;
export {};