@@ -13,7 +13,8 @@ sealed interface Action {
1313 description.type,
1414 description.mode,
1515 buildVariables(description.input),
16- buildEvents(description.emits),
16+ description.output,
17+ buildConditionalEvents(description.emits),
1718 )
1819
1920 is MatchDescription ->
@@ -57,7 +58,8 @@ sealed interface Action {
5758 ContextVariable .lazy(k, expression)
5859 }
5960
60- private fun buildEvents (events : List <EventDescription >) = events.map { Event .from(it) }
61+ private fun buildConditionalEvents (events : List <ConditionalEventDescription >) =
62+ events.map { ConditionalEvent .from(it) }
6163 }
6264}
6365
@@ -74,12 +76,13 @@ internal constructor(
7476 val type: String ,
7577 val mode: InvocationMode ,
7678 val input: List <ContextVariable >,
77- val emits: List <Event >,
79+ val output: List <String >,
80+ val emits: List <ConditionalEvent >,
7881) : EventRaisingAction {
79- override fun raises (): List <Event > = emits
82+ override fun raises (): List <Event > = emits.map { it.event }
8083
8184 override fun toString () =
82- " InvokeAction(type='$type ', mode='$mode ', input='$input ', emits='$emits ')"
85+ " InvokeAction(type='$type ', mode='$mode ', input='$input ', output=' $output ', emits='$emits ')"
8386}
8487
8588class MatchAction
0 commit comments