diff --git a/Cargo.toml b/Cargo.toml index 517aea6..491e240 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "lamm" -version = "0.2.0" +version = "0.2.1" edition = "2021" license = "MIT" description = "a simple, functional paradigm programming language which uses Polish notation" diff --git a/src/lib.rs b/src/lib.rs index de35b96..58a2ca7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -178,8 +178,14 @@ impl<'a, R: BufRead> Runtime<'a, R> { pub fn new(reader: R) -> Self { Self { tokenizer: Tokenizer::new(reader).peekable(), - global_types: HashMap::new(), - globals: HashMap::new(), + global_types: HashMap::from([ + ("version'".into(), Type::String) + ]), + globals: HashMap::from([ + ("version'".into(), Arc::new( + Mutex::new( + Object::value(Value::String(env!("CARGO_PKG_VERSION").into()), HashMap::new(), HashMap::new())))) + ]), parser: None, } }