diff --git a/source/parser/function.civet b/source/parser/function.civet index a682710f..08369e28 100644 --- a/source/parser/function.civet +++ b/source/parser/function.civet @@ -454,7 +454,7 @@ function assignResults(node: StatementTuple[] | ASTNode, collect: (node: ASTNode when "PipelineExpression" // At statement level, pipeline generates semicolons between statements // Return the last one - semi := exp.children.indexOf ";" + semi := exp.children.lastIndexOf ";" if 0 <= semi < exp.children# - 1 exp.children[semi+1..] = [collect exp.children[semi+1..]] return