1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
#![deny(missing_docs)] //! `litto` provides some building blocks for building scripting languages //! that can be embedded in a Rust application or library. //! //! The name comes from `little` and `ditto` (A Pokémon name). //! //! `litto` does not define a scripting language in a concrete way. //! For example, syntax, types, stdlib can all be customized. //! Refer to [`Interpreter`](trait.Interpreter.html) for the abstraction. //! //! Although the [`Interpreter`](trait.Interpreter.html) is abstract, this //! crate does provide some building blocks to make it easier to implement //! [`Interpreter`](trait.Interpreter.html). For example: //! //! - [`env::KvEnv`](env/struct.KvEnv.html): A nested environment that can //! be used to resolve variables from string name to value. //! - [`value::Value`](value/struct.Value.html): An abstract value that is //! tracked by a cyclic garbage collector, and supports function calls. //! - [`expr::Sexp`](expr/enum.Sexp.html): S-expression, commonly seen in //! Lisp-like languages. //! //! # Example Languages //! - [tinylang](lang/tinylang/index.html): A tiny language with Lisp-like //! syntax. It basically only implements `lambda` but is already powerful. //! See its tests for details. //! - [minilang](lang/minilang/index.html): Extends `tinylang` with more stdlib //! functions and types. It has a test REPL in `examples/minilang-repl`. pub mod env; pub mod expr; mod interpreter; pub mod value; pub use interpreter::Interpreter; pub mod lang; /// Re-export. Provides garbage collection support. pub use gcmodule;