strings in variables can now be received by get_string_token

and inputs can be directly assigned to a variable
This commit is contained in:
2026-05-26 20:35:57 +01:00
parent f6a95f76bd
commit cc3eca857d
8 changed files with 68 additions and 28 deletions
+3 -2
View File
@@ -30,7 +30,7 @@ pub fn keyword_parse(
{
"choice" =>
{
(index,_) = choice_parse(tokens, index, happening_queue, rx)?;
(index,_) = choice_parse(tokens, index, happening_queue, rx,variables)?;
},
"if" =>
{
@@ -114,6 +114,7 @@ pub fn choice_parse
mut index: usize,
happening_queue: &Arc<Mutex<VecDeque<api::DataToSend>>>,
rx: &Receiver<(usize,String)>,
variables: &HashMap<String,tokenise::Value>,
)
-> Result<(usize,String), String>
{
@@ -125,7 +126,7 @@ pub fn choice_parse
index += 1;
choices.push
(
tokenise::get_string_token(tokens, index)?
tokenise::get_string_token(tokens, index,variables)?
);
index += 1;
choice_indeces.push(index+1);