Skip to content

Parser.parse method

Parser › parse

Unofficial

Parse a document.

Signature:

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

Parameters:

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

Returns: LezerTreeThe parsed tree.