class

Parser

@Js
const class Parser : Obj

Parse input text into a tree of nodes.

The parser is thread-safe meaning the same parser can be shared by multiple actors.

constructors make

Get a parser with all the default configuration

methods parseStream

Parse the contents of the input stream into a tree of nodes

builder

Obtain a builder for configuring the parser

parseFile

Convenience to parse a file into a Document

parse

Convenience for parseStream(text.in)

builder static ParserBuilder builder()

Obtain a builder for configuring the parser

make static new make()

Get a parser with all the default configuration

parse Document parse(Str text)

Convenience for parseStream(text.in)

parseFile Document parseFile(File file)

Convenience to parse a file into a Document. If source span parsing is enabled the nodes will have access to the file location using Node.loc.

parseStream Document parseStream(InStream in)

Parse the contents of the input stream into a tree of nodes.

doc := Parser().parse("Hello *Markdown*!")

Haxall 4.0.5 ∙ 24-Feb-2026 14:33 EST