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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user