Mercurial > projects > dil
diff trunk/src/Expressions.d @ 299:559d5d62e0c1
- Added checks for null before adding member to Node.children.
- Added finishConstruction() to FunctionBody.
author | aziz |
---|---|
date | Thu, 09 Aug 2007 21:39:03 +0000 |
parents | 418c6548ce17 |
children | df237b3b5f09 |
line wrap: on
line diff
--- a/trunk/src/Expressions.d Thu Aug 09 19:49:03 2007 +0000 +++ b/trunk/src/Expressions.d Thu Aug 09 21:39:03 2007 +0000 @@ -726,7 +726,9 @@ this(Expression expr, Expression msg) { mixin(set_kind); - this.children = [expr, msg]; + this.children = [expr]; + if (msg) + this.children ~= msg; this.expr = expr; this.msg = msg; } @@ -873,7 +875,12 @@ assert(keys.length == values.length); mixin(set_kind); foreach (i, key; keys) - this.children ~= [key, values[i]]; + { + if (key) + this.children ~= key; + if (values[i]) + this.children ~= values[i]; + } this.keys = keys; this.values = values; }