MCPcopy Create free account
hub / github.com/ScaleML/AgentSPEX / _parse_switch_step

Method _parse_switch_step

src/harness/parsing/yaml_parser.py:222–233  ·  view source on GitHub ↗

Parse switch statement

(self, step_data: Dict[str, Any])

Source from the content-addressed store, hash-verified

220 }
221
222 def _parse_switch_step(self, step_data: Dict[str, Any]) -> Dict[str, Any]:
223 """Parse switch statement"""
224 cases = {}
225 for case_value, case_steps in step_data.get("cases", {}).items():
226 cases[case_value] = self._parse_steps_list(case_steps)
227
228 return {
229 "type": "switch",
230 "variable": step_data.get("variable", ""),
231 "cases": cases,
232 "default": self._parse_steps_list(step_data.get("default", [])),
233 }
234
235 def _parse_parallel_step(self, step_data: List[Dict[str, Any]]) -> Dict[str, Any]:
236 """Parse parallel steps"""

Callers 2

_parse_stepMethod · 0.95

Calls 2

_parse_steps_listMethod · 0.95
getMethod · 0.80

Tested by 1