///|
fn Parser::parse_all(self : Parser) -> Unit {
  while !self.is_eof() {
    self.parse_next()
  }
  self.flush_pending_text()
}

///|
/// Process the next markup construct or run of text; `parse_all` calls this
/// until the input is exhausted.
fn Parser::parse_next(self : Parser) -> Unit {
  let start = self.pos
  if self.current().unwrap() == '<' {
    if self.starts_with("