Skip to content

Parser.parse method

Parser › parse

Unofficial

Parse a document.

Signature:

parse(input: string | Input, fragments?: readonly LezerTreeFragment[], ranges?: readonly LezerTreeRange[]): LezerTree

Parameters:

ParameterTypeDescription
inputstring | InputThe document input or string.
fragments?readonly LezerTreeFragment[]Previously parsed fragments that can be reused.
ranges?readonly LezerTreeRange[]The ranges of the document to parse.

Returns: LezerTree — The parsed tree.