Ejemplo n.º 1
0
 public void VisitInstructionTok(CilInstructionTok instruction)
 {
     if (instruction is LoadTokenInstruction loadTokenInstruction)
     {
         VisitLoadTokenInstruction(loadTokenInstruction);
     }
     else
     {
         throw new ArgumentException($"CIL instruction tok cannot be recognized: '{instruction.ToString()}'.");
     }
 }
Ejemplo n.º 2
0
        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();
        }
Ejemplo n.º 3
0
        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();
        }