[−][src]Crate binks
binks is an interpreted dynamically typed embededd scripting language trying to be as simple as python and as clean looking as possible, written 100% in rust
use binks::Data::*; fn main() -> Result<(), Box<dyn Error>> { let x = binks::run(r#" let x = 10 x = x + 1 "#)?.vars["x"].clone(); assert_eq!(x, Int(11)); println!("{:?}", x); Ok(()) }
Modules
functions | function struct and its behavier |
import | imports of binks files and dynamic librarys |
interpreter | the interpreter the Program struct and the Data enum |
lexer | the tokenizer and Token enum |
oop | oop items |
preload | contain the mod usful features of the crate for you to not have to import them manualy |
vars | Token form expresion to data for every one of the primitives and a whoel expretion |
Functions
run | run the code T where T: Into<String> and reurtns the Program that results in it |