Пример #1
0
        public override void Generate(CodeGenerator cg)
        {
            AccessNode variable = left.GenerateForAssign(cg);

            if (variable == null)
            {
                FieldInfo fieldInfo = left.varInfo.fieldBuilder;
                right.Generate(cg);
                cg.generator.Emit(OpCodes.Stsfld, fieldInfo);
            }
            else
            {
                #region TODO superparche
                if (variable as IndexerNode != null)
                {
                    (variable as IndexerNode).index.Generate(cg);
                    right.Generate(cg);
                    variable.GenerateForAssign(cg);
                }
                #endregion TODO end superparche
                else
                {
                    right.Generate(cg);
                    variable.GenerateForAssign(cg);
                }
            }
        }
Пример #2
0
 public override void Generate(CodeGenerator cg)
 {
     foreach (var item in Children)
     {
         AccessNode t = item as AccessNode;
         t.Generate(cg);
     }
 }
Пример #3
0
 public AccessNode(AccessNode n) : base(n)
 {
 }