This repository was archived by the owner on May 18, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -1176,6 +1176,7 @@ algorithm
11761176 case "floor" then evalBuiltinFloor(listHead(args));
11771177 case "identity" then evalBuiltinIdentity(listHead(args));
11781178 case "integer" then evalBuiltinInteger(listHead(args));
1179+ case "Integer" then evalBuiltinIntegerEnum(listHead(args));
11791180 case "log10" then evalBuiltinLog10(listHead(args), target);
11801181 case "log" then evalBuiltinLog(listHead(args), target);
11811182 // case "matrix" then evalBuiltinMatrix(args);
@@ -1595,6 +1596,16 @@ algorithm
15951596 end match;
15961597end evalBuiltinInteger;
15971598
1599+ function evalBuiltinIntegerEnum
1600+ input Expression arg;
1601+ output Expression result;
1602+ algorithm
1603+ result := match arg
1604+ case Expression . ENUM_LITERAL () then Expression . INTEGER (arg. index);
1605+ else algorithm printWrongArgsError(getInstanceName(), {arg}, sourceInfo()); then fail();
1606+ end match;
1607+ end evalBuiltinIntegerEnum;
1608+
15981609function evalBuiltinLog10
15991610 input Expression arg;
16001611 input EvalTarget target;
You can’t perform that action at this time.
0 commit comments