Skip to content

Commit

Permalink
Add CompositeHeader.TryIOType ✨ #243
Browse files Browse the repository at this point in the history
  • Loading branch information
Freymaurer committed Nov 14, 2023
1 parent b25be23 commit 01e07e4
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/ISA/ISA/ArcTypes/CompositeHeader.fs
Original file line number Diff line number Diff line change
Expand Up @@ -417,16 +417,21 @@ type CompositeHeader =
| FreeText _ -> true
| anythingElse -> false

member this.tryInput() =
member this.TryInput() =
match this with
| Input io -> Some io
| _ -> None

member this.tryOutput() =
member this.TryOutput() =
match this with
| Output io -> Some io
| _ -> None

member this.TryIOType() =
match this with
| Output io | Input io -> Some io
| _ -> None

member this.TryParameter() =
match this with
| Parameter oa -> Some (ProtocolParameter.create(ParameterName = oa))
Expand Down

0 comments on commit 01e07e4

Please sign in to comment.