[TM-223] Add 'case' statement
Description
This PR attempts to add a case
statement to Indigo. Initially attempt was made to add a case expression, but the types didn't work out. So this PR contains a wip attempt to implement it as a statement.
Basically this piggybacks on the case
instruction for Lorentz, and just adapts it to use in Indigo. So this PR adds a type IndigoCaseClauseL
which is just a wrapper for the CaseClauseL
type that the Lorentz case
instruction uses. And then, when creating the IndigoM
value, we use the Lorentz case_
function to generate embedded code.
Related issue(s)
https://issues.serokell.io/issue/TM-223
✅ Checklist for your Merge Request
Related changes (conditional)
-
Tests (see short guidelines)
-
If I added new functionality, I added tests covering it. -
If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again.
-
-
Documentation
Stylistic guide (mandatory)
-
My commits comply with the following policy. -
My code complies with the style guide.
Edited by Sandeep.C.R