public void VisitInstructionSwitch(CilInstructionSwitch instruction) { if (instruction is SwitchInstruction switchInstruction) { VisitSwitchInstruction(switchInstruction); } else { throw new ArgumentException($"CIL instruction switch cannot be recognized: '{instruction.ToString()}'."); } }
public override void Init(AstContext context, ParseTreeNode parseNode) { // _("switch") var switchChildren = AstChildren.Empty() .Add("switch"); if (switchChildren.PopulateWith(parseNode)) { Instruction = new SwitchInstruction(); return; } throw new NotImplementedException(); }