private void ReturnArrayOfVertices(Expression expr) { var nai = expr.Expect <NewArrayExpression> (ExpressionType.NewArrayInit); foreach (var subExpr in nai.Expressions) { var mie = subExpr.Expect <MemberInitExpression> (ExpressionType.MemberInit); foreach (MemberAssignment assign in mie.Bindings) { _currentScope.CodeOut(Ast.Ass( Ast.VRef(_globalVars [assign.Member.Name]), Expr(assign.Expression))); } _currentScope.CodeOut(Ast.CallS(Ast.Call("EmitVertex ()"))); } _currentScope.CodeOut(Ast.CallS(Ast.Call("EndPrimitive ()"))); }