2022-12-05 22:19:50 +00:00
|
|
|
package com.htmlism.firepower.core
|
|
|
|
|
2023-10-03 20:15:10 +00:00
|
|
|
import com.htmlism.firepower.core.AsmBlock.*
|
2022-12-05 22:19:50 +00:00
|
|
|
|
2022-12-07 23:12:49 +00:00
|
|
|
case class Subroutine(name: String, description: String, intents: () => List[MetaIntent]):
|
|
|
|
def call: MetaIntent =
|
2022-12-07 23:08:09 +00:00
|
|
|
MetaIntent.Jump(name, description, intents())
|
2022-12-05 22:19:50 +00:00
|
|
|
|
2022-12-07 19:42:03 +00:00
|
|
|
object Subroutine:
|
2022-12-07 22:55:54 +00:00
|
|
|
def apply(name: String, description: String): Subroutine =
|
2022-12-07 23:08:09 +00:00
|
|
|
Subroutine(name, description, () => Nil)
|