mirror of
https://github.com/irmen/prog8.git
synced 2026-03-11 05:41:42 +00:00
be able to parse multiple return values (sub + return)
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user