Function sparser::parse
[−]
[src]
pub fn parse(input: &'static str) -> Value
This function will return a abstract syntax tree represented as a deep nested linked list for given s-expression syntax.
If some syntax error was in the input the program calling this function will panic.
Example:
use sparser::parse; let tree = parse("(define (fac n) (if (= n 0) 1 (* (fac (- n 1)))))"); assert_eq!(tree.car().unwrap_symbol(), "define")