added the ability to export existing variables

This commit is contained in:
2025-03-27 01:31:40 -04:00
parent 1854578d49
commit 9989663c97
4 changed files with 55 additions and 23 deletions

View File

@@ -5,7 +5,7 @@ use super::*;
#[test]
fn simple_expansion() {
let varsub = "$foo";
write_vars(|v| v.new_var("foo", "this is the value of the variable".into()));
write_vars(|v| v.set_var("foo", "this is the value of the variable".into()));
let mut tokens: Vec<Tk> = LexStream::new(Arc::new(varsub.to_string()), LexFlags::empty())
.map(|tk| tk.unwrap())