public MonadicOperationStructure(TypeStructure rt, ExpressionStructure exp, BuilderStructure call)
     : base(rt)
 {
     Expression = exp;
     Call = call;
     AppendChild(Expression);
 }
 public void Initialize(BuilderStructure inst, IReadOnlyList<TypeStructure> prms, TypeStructure di, MethodInfo info = null)
 {
     BaseInstance = inst;
     GenericParameter = prms;
     DeclaringInstance = di;
     Info = info;
 }
 public DyadicOperationStructure(TypeStructure rt, ExpressionStructure left, ExpressionStructure right, BuilderStructure call, ExpressionStructure next = null)
     : base(rt)
 {
     Left = left;
     Right = right;
     Call = call;
     Next = next;
     AppendChild(Left);
     if (Next == null)
     {
         AppendChild(Right);
     }
     else
     {
         AppendChild(Next);
     }
 }
Ejemplo n.º 4
0
 public CallStructure(TypeStructure rt, BuilderStructure call, ExpressionStructure pre, CilStructure variant)
     : base(rt)
 {
     Call = call;
     Pre = pre;
     Access = pre;
     Variant = variant;
     Arguments = new List<ExpressionStructure>();
     Converters = new List<BuilderStructure>();
     if (Access != null)
     {
         AppendChild(Access);
     }
     if (Arguments != null)
     {
         AppendChild(Arguments);
     }
 }
Ejemplo n.º 5
0
 public CallStructure(TypeStructure rt, BuilderStructure call, ExpressionStructure pre, CilStructure access, CilStructure variant, IReadOnlyList<ExpressionStructure> args, IReadOnlyList<BuilderStructure> convs, bool isVariadic = false)
     : base(rt)
 {
     Call = call;
     Pre = pre;
     Access = access;
     Variant = variant;
     Arguments = args;
     Converters = convs;
     IsVariadic = isVariadic;
     if (Access != null)
     {
         AppendChild(Access);
     }
     if (Arguments != null)
     {
         AppendChild(Arguments);
     }
 }
Ejemplo n.º 6
0
 private TypeStructure GetVariadicType(BuilderStructure call)
 {
     var c = call as MethodBaseStructure;
     if (c == null)
     {
         return null;
     }
     return c.Arguments.Last().ParamType;
 }
Ejemplo n.º 7
0
 private int GetVariadicLangth(BuilderStructure call)
 {
     var c = call as MethodBaseStructure;
     if (c == null)
     {
         return -1;
     }
     return Arguments.Count - c.Arguments.Count + 1;
 }
Ejemplo n.º 8
0
 private int GetVariadicIndex(BuilderStructure call)
 {
     var c = call as MethodBaseStructure;
     if(c == null)
     {
         return -1;
     }
     return c.Arguments.Count - 1;
 }