- Index
- »
- fan.markdown
- »
- Parser
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.
Get a parser with all the default configuration
Parse the contents of the input stream into a tree of nodes
Obtain a builder for configuring the parser
Convenience to parse a file into a Document
Convenience for parseStream(text.in)
static ParserBuilder builder()
Obtain a builder for configuring the parser
static new make()
Get a parser with all the default configuration
Document parse(Str text)
Convenience for parseStream(text.in)
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.
Document parseStream(InStream in)
Parse the contents of the input stream into a tree of nodes.
doc := Parser().parse("Hello *Markdown*!")