diff --git a/src/protocol/eval.rs b/src/protocol/eval.rs index 8b0131de87bcb525ea2055ffae180d5de0e2513d..6c7de0873cbf2cdb68d8bb9afad60a9bc439a86b 100644 --- a/src/protocol/eval.rs +++ b/src/protocol/eval.rs @@ -1605,7 +1605,7 @@ pub enum EvalContinuation { Terminal, SyncBlockStart, SyncBlockEnd, - NewComponent(DeclarationId, Vec), + NewComponent(DefinitionId, Vec), BlockFires(Value), BlockGet(Value), Put(Value, Value), @@ -1699,7 +1699,7 @@ impl Prompt { if value.as_boolean().0 { self.position = Some(stmt.body); } else { - self.position = stmt.next.map(|x| x.upcast()); + self.position = stmt.end_while.map(|x| x.upcast()); } Err(EvalContinuation::Stepping) } @@ -1759,7 +1759,12 @@ impl Prompt { args.push(value); } self.position = stmt.next; - Err(EvalContinuation::NewComponent(expr.declaration.unwrap(), args)) + match &expr.method { + Method::Symbolic(symbolic) => { + Err(EvalContinuation::NewComponent(symbolic.definition.unwrap(), args)) + }, + _ => unreachable!("not a symbolic call expression") + } } Statement::Put(stmt) => { // Evaluate port and message