mirror of
https://github.com/irmen/prog8.git
synced 2024-06-14 00:29:34 +00:00
19 lines
311 B
Kotlin
19 lines
311 B
Kotlin
package prog8.astvm
|
|
|
|
import prog8.ast.INameScope
|
|
import java.util.*
|
|
|
|
class CallStack {
|
|
|
|
private val stack = Stack<Pair<INameScope, Int>>()
|
|
|
|
fun pop(): Pair<INameScope, Int> {
|
|
return stack.pop()
|
|
}
|
|
|
|
fun push(scope: INameScope, index: Int) {
|
|
stack.push(Pair(scope, index))
|
|
}
|
|
|
|
}
|