Skip to content

Diegovsky/pulldown-kdl

Repository files navigation

Pulldown-KDL

This project implements a pull parser for the KDL Document Language version 2, written in Rust.

Rationale

Unlike node-based or serde-based parsers, pull parsers don't load the document at once in memory, choosing instead to "stream" events as it reads the document. This improves performance while also allowing other types of parsers to be built as higher level abstractions. Check out pulldown-cmark's (a major inspiration in philosophy) short manifesto on Why a pull parser.

It's currently in its infancy, so, if you need a complete and stable library, take a look at kdl-rs.

What is implemented

  • Nodes
    • Inline nodes
    • Without children
    • With cildren
  • Parameters
    • Arguments
    • Properties
  • Values
    • String
      • Ident String
      • Quoted String
      • Raw Strings
      • Escapes
      • Multiline
    • Number
      • Keyword numbers (inf, -inf, nan)
      • Exponent
    • Boolean
    • Null
  • Comments
    • Inline
    • Multiline
    • Slashdash
  • Type Annotations
  • Other stuff
    • Unicode
    • Line escapes

Since this crate is developed to serve htmeta's purpose, features related to that project are prioritized, but PRs for other features are definitetely welcome!

About

A pull parser implementation inspired by pulldown-cmark

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published