Sha256: 5a2de0b477807c7d6ab8bb72579f03692e8f5ea89d5b6f3a8342cfdbe4d84b96
Contents?: true
Size: 563 Bytes
Versions: 13
Compression:
Stored size: 563 Bytes
Contents
//! In this example we build an [S-expression](https://en.wikipedia.org/wiki/S-expression) //! parser and tiny [lisp](https://en.wikipedia.org/wiki/Lisp_(programming_language)) interpreter. //! Lisp is a simple type of language made up of Atoms and Lists, forming easily parsable trees. #![cfg(feature = "alloc")] mod parser; fn main() { let expression_1 = "((if (= (+ 3 (/ 9 3)) (* 2 3)) * /) 456 123)"; println!( "\"{}\"\nevaled gives us: {:?}", expression_1, parser::eval_from_str(expression_1) ); }
Version data entries
13 entries across 13 versions & 1 rubygems