public void VisitInstructionTok(CilInstructionTok instruction) { if (instruction is LoadTokenInstruction loadTokenInstruction) { VisitLoadTokenInstruction(loadTokenInstruction); } else { throw new ArgumentException($"CIL instruction tok cannot be recognized: '{instruction.ToString()}'."); } }
public override void Init(AstContext context, ParseTreeNode parseNode) { // INSTR_TOK var instrTokChildren = AstChildren.Empty() .Add <INSTR_TOKAstNode>(); if (instrTokChildren.PopulateWith(parseNode)) { Instruction = instrTokChildren.Child1.Instruction; return; } throw new NotImplementedException(); }
public override void Init(AstContext context, ParseTreeNode parseNode) { // _("ldtoken") var ldtokenChildren = AstChildren.Empty() .Add("ldtoken"); if (ldtokenChildren.PopulateWith(parseNode)) { Instruction = new LoadTokenInstruction(); return; } throw new NotImplementedException(); }