README

kokic/notiz/parsing does not have a README file

#
SyntaxError

pub(all) suberror SyntaxError {
Mismatch(
Position
, Array[Expected])
Unexpected(
Position
, String)
} derive(Eq,
Debug
)

A syntax error raised while parsing notiz markdown.

Carries the failure position and a structured description of what went wrong, instead of an opaque message string.
impl Show for SyntaxError

#
SyntaxError::equal

fn SyntaxError::equal(SyntaxError, SyntaxError) -> Bool

#
SyntaxError::not_equal

fn SyntaxError::not_equal(x : SyntaxError, y : SyntaxError) -> Bool

#
SyntaxError::of_parse_error

Converts a @talc.ParseError into the typed [SyntaxError].

This is the single place that interprets the parser engine's string labels; every label below this point is structured.

#
SyntaxError::output

fn SyntaxError::output(self : SyntaxError, logger : &Logger) -> Unit

#
SyntaxError::position

The source position where the parse failed.

#
SyntaxError::to_string

fn SyntaxError::to_string(self : SyntaxError) -> String

#
Block

pub(all) enum Block {
Heading(Int, Array[Inline])
Paragraph(Array[Inline])
Blockquote(Array[Block])
UnorderedList(Array[MdListItem])
OrderedList(Array[MdListItem])
FencedCode(String?, String)
DisplayMath(String)
ThematicBreak
Table(TableRow, Array[TableRow])
FootnoteDef(String, Array[Block])
} derive(Eq,
Debug
)

#
Block::equal

fn Block::equal(Block, Block) -> Bool

#
Block::not_equal

fn Block::not_equal(x : Block, y : Block) -> Bool

#
Block::to_repr

#
Expected

pub(all) enum Expected {
Char(Char)
Str(String)
OneOf(String)
EndOfInput
TableDelimiterRow
Other(String)
} derive(Eq,
Debug
)

What the parser expected to find at a failure position.

#
Expected::equal

fn Expected::equal(Expected, Expected) -> Bool

#
Expected::not_equal

fn Expected::not_equal(x : Expected, y : Expected) -> Bool

#
Expected::to_repr

#
Inline

pub(all) enum Inline {
Plain(String)
Strong(Array[Inline])
Emph(Array[Inline])
Code(String)
Image(String, String)
SoftBreak
HardBreak
InlineMath(String)
FootnoteRef(String)
} derive(Eq,
Debug
)

AST types

#
Inline::equal

fn Inline::equal(Inline, Inline) -> Bool

#
Inline::not_equal

fn Inline::not_equal(x : Inline, y : Inline) -> Bool

#
Inline::to_repr

#
MdListItem

pub(all) struct MdListItem {
checked : Bool?
content : Array[Inline]
children : Array[Block]
} derive(Eq,
Debug
)

#
MdListItem::equal

fn MdListItem::equal(MdListItem, MdListItem) -> Bool

#
MdListItem::not_equal

fn MdListItem::not_equal(x : MdListItem, y : MdListItem) -> Bool

#
TableRow

pub(all) struct TableRow {
cells : Array[Array[Inline]]
} derive(Eq,
Debug
)

#
TableRow::equal

fn TableRow::equal(TableRow, TableRow) -> Bool

#
TableRow::not_equal

fn TableRow::not_equal(x : TableRow, y : TableRow) -> Bool

#
TableRow::to_repr

#
format_parse_error

fn format_parse_error(err : SyntaxError, source : String) -> String

Formats a syntax error with a source snippet and caret marker.

Returns a multi-line message like:

parse error at 1:2: expected a space, found 'a' 1 | hello world | ^

#
parse_inlines

fn parse_inlines(text : String) -> Result[Array[Inline],
ParseError
]

#
special_chars

let special_chars : String

Inline parsers

Powered by MoonBit

Site sourceReport issuePackagesBuild queueSkillsStatistics

© 2026 mooncakes.io