Mercurial > projects > ddmd
view dmd/InlineDoState.d @ 90:39648eb578f6
more Expressions work
author | Eldar Insafutdinov <e.insafutdinov@gmail.com> |
---|---|
date | Mon, 30 Aug 2010 20:27:56 +0100 |
parents | be2ab491772e |
children | e28b18c23469 |
line wrap: on
line source
module dmd.InlineDoState; import dmd.Array; import dmd.Dsymbol; import dmd.VarDeclaration; import dmd.Expression; import dmd.ArrayTypes; class InlineDoState { VarDeclaration vthis; Array from; // old Dsymbols Array to; // parallel array of new Dsymbols Dsymbol parent; // new parent this() { from = new Array(); to = new Array(); } } /****************************** * Perform doInline() on an array of Expressions. */ Expressions arrayExpressiondoInline(Expressions a, InlineDoState ids) { Expressions newa = null; if (a) { newa = new Expressions(); newa.setDim(a.dim); foreach (size_t i, Expression e; a) { if (e) { e = e.doInline(ids); newa[i] = e; } } } return newa; }