lisp_iter 0.1.0

Single-pass no-alloc iterator for simple lisp or lisp-like expressions
Documentation
  • Coverage
  • 58.33%
    7 out of 12 items documented0 out of 5 items with examples
  • Size
  • Source code size: 7.81 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.54 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • DMClVG/lisp_iter
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • DMClVG

lisp_iter

Single-pass no-alloc iterator for simple lisp or lisp-like expressions.

use lisp_iter::LispIter;

fn main() {
    let mut iter = LispIter::new(r#"(this-is-a-identifier :a 123 "wow") ; :a is shorthand for "a" "#);
    let mut list = iter.next().unwrap().into_iter(); // Retrieve first list in iterator

    println!("{:?}", list.next().unwrap()); // Identifier("this-is-a-identifier")
    println!("{:?}", list.next().unwrap()); // Quote("a")
    println!("{:?}", list.next().unwrap()); // Integer(0)
    println!("{:?}", list.next().unwrap()); // Quote("wow")
}

Useful to glance over anything lispy with minimal to 0 overhead.