UNPKG

htmljs-parser

Version:

An HTML parser recognizes content and string placeholders and allows JavaScript expressions as attribute values

24 lines (23 loc) 986 B
import { type ParserOptions, type Range } from "./internal"; export { TagType, ErrorCode, getLines, getLocation, getPosition, type ParserOptions as Handlers, type Position, type Location, type Ranges, type Range, } from "./internal"; /** * Creates a new Marko parser. */ export declare function createParser(handlers: ParserOptions): { /** * Parses code and calls the provided handlers. */ parse(code: string): void; /** * Given an offset range in the current source code, reads and returns the substring in the input code. */ read(range: Range): string; /** * Given a offset in the current source code, returns a Position object with line & character information. */ positionAt(offset: number): import("./internal").Position; /** * Given a offset range in the current source code, returns a Location object with a start & end position information. */ locationAt(range: Range): import("./internal").Location; };