Example #1
0
 public static NativeMethodInvocationExpression AppendToArray(IParseTree context, IExpression array, IExpression value)
 {
     return(new NativeMethodInvocationExpression(
                context,
                nativeMethodName: "Append To Array",
                returnType: AstCloner.Clone((GenericType)array.Type),
                readsState: false,
                changesState: false,
                modifiesControlFlow: false,
                children: new INode[] { array, value }.Where(x => x != null)));
 }
Example #2
0
 public static NativeMethodInvocationExpression EmptyArray(IParseTree context, Root root, ITypeNode type)
 {
     return(new NativeMethodInvocationExpression(
                context,
                nativeMethodName: "Empty Array",
                returnType: new GenericType(context, new [] { new ReferenceType(context, root.ListDeclaration), AstCloner.Clone(type) }),
                readsState: false,
                changesState: false,
                modifiesControlFlow: false,
                children: new INode[0]));
 }