be able to parse multiple return values (sub + return)

This commit is contained in:
Irmen de Jong
2025-01-07 00:20:41 +01:00
parent 35d9412559
commit ca9422bbe9
18 changed files with 130 additions and 106 deletions

View File

@@ -130,17 +130,7 @@ class PtRepeatLoop(position: Position) : PtNode(position) {
}
class PtReturn(position: Position) : PtNode(position) {
val hasValue: Boolean
get() = children.any()
val value: PtExpression?
get() {
return if(children.any())
children.single() as PtExpression
else
null
}
}
class PtReturn(position: Position) : PtNode(position) // children are all expressions
sealed interface IPtVariable {