feat: implement case function (#16)

Follow GitHub Actions

* added unit tests

Closes #15

Reviewed-on: https://gitea.com/actions-oss/act-cli/pulls/16
Co-authored-by: ChristopherHX <christopher.homberger@web.de>
Co-committed-by: ChristopherHX <christopher.homberger@web.de>
This commit is contained in:
ChristopherHX
2025-12-18 19:27:30 +00:00
committed by ChristopherHX
parent 83cbf1f2b8
commit ee2e0135d5
6 changed files with 164 additions and 14 deletions

View File

@@ -64,7 +64,7 @@ func (ee ExpressionEvaluator) canEvaluate(parsed exprparser.Node, snode *schema.
canEvaluate = canEvaluate && ee.EvaluationContext.Variables.Get(v) != nil
}
for _, v := range snode.GetFunctions() {
canEvaluate = canEvaluate && ee.EvaluationContext.Functions.Get(v.Name) != nil
canEvaluate = canEvaluate && ee.EvaluationContext.Functions.Get(v.GetName()) != nil
}
exprparser.VisitNode(parsed, func(node exprparser.Node) {
switch el := node.(type) {