Implement return for root
This commit is contained in:
parent
8c4b2c9eef
commit
ee692b360e
@ -113,6 +113,10 @@ impl AbstractTree for Root {
|
|||||||
|
|
||||||
for statement in &self.statements {
|
for statement in &self.statements {
|
||||||
value = statement.run(source, context)?;
|
value = statement.run(source, context)?;
|
||||||
|
|
||||||
|
if statement.is_return() {
|
||||||
|
return Ok(value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(value)
|
Ok(value)
|
||||||
|
Loading…
Reference in New Issue
Block a user