diff --git a/src/protocol/ast.rs b/src/protocol/ast.rs index 43e2694f36c3442237d9133e20e31adb791933ab..2ec91950cccab65a5a367f7f582b1ee9bb61a25a 100644 --- a/src/protocol/ast.rs +++ b/src/protocol/ast.rs @@ -931,7 +931,7 @@ impl Statement { } pub fn link_next(&mut self, next: StatementId) { match self { - Statement::Block(_) => todo!(), + Statement::Block(stmt) => stmt.next = next, Statement::EndBlock(stmt) => stmt.next = next, Statement::Local(stmt) => match stmt { LocalStatement::Channel(stmt) => stmt.next = next, @@ -969,6 +969,7 @@ pub struct BlockStatement { pub relative_pos_in_parent: u32, pub locals: Vec, pub labels: Vec, + pub next: StatementId, } #[derive(Debug, Clone)]