various fixes

This commit is contained in:
Irmen de Jong
2024-03-16 16:47:40 +01:00
parent 5b7801eea1
commit 5a0524ff4d
15 changed files with 63 additions and 1186 deletions
+1
View File
@@ -67,6 +67,7 @@ class PtProgram(
children.asSequence().filterIsInstance<PtBlock>()
fun entrypoint(): PtSub? =
// returns the main.start subroutine if it exists
allBlocks().firstOrNull { it.name == "main" || it.name=="p8b_main" }
?.children
?.firstOrNull { it is PtSub && (it.name == "start" || it.name=="main.start" || it.name=="p8s_start" || it.name=="p8b_main.p8s_start") } as PtSub?