1 unstable release

0.1.0 Feb 8, 2024

#2231 in Parser implementations

MIT license

32KB
814 lines

ß (Ringel-S)

A simple S-Expression parser

Features

  • miette error reporting with source annotation

    use the miette feature and either OffsetTracker or LineTracker as tracker

  • Location tracking of tokens and nodes
  • UTF-8/String first
  • Top level can contain multiple nodes

Example

fn example() {
    let parser = ParserOptions::new()
        .with_comments()
        .build_with_tracker::<OffsetTracker>("(hello #| world |#)");
  
  let Some(Ok(node)) = parser.next() else { panic!(":(") };
  
}

Dependencies

~0.2–1MB
~21K SLoC