Mercurial > projects > ddmd
diff dmd/BinExp.d @ 123:9e39c7de8438
Make dmd test suite compile
author | korDen |
---|---|
date | Fri, 03 Sep 2010 20:46:58 +0400 |
parents | 352a5164f692 |
children | 1765f3ef917d |
line wrap: on
line diff
--- a/dmd/BinExp.d Thu Sep 02 23:37:49 2010 +0100 +++ b/dmd/BinExp.d Fri Sep 03 20:46:58 2010 +0400 @@ -672,7 +672,8 @@ void scanForNestedRef(Scope sc) { - assert(false); + e1.scanForNestedRef(sc); + e2.scanForNestedRef(sc); } Expression interpretCommon(InterState istate, Expression function(Type, Expression, Expression) fp) @@ -1959,6 +1960,8 @@ case TOK.TOKleg: case TOK.TOKue: break; + default: + break; /// } return e; @@ -2008,6 +2011,15 @@ return e; } + final void AssignExp_buildArrayIdent(OutBuffer buf, Expressions arguments, string Str) + { + /* Evaluate assign expressions right to left + */ + e2.buildArrayIdent(buf, arguments); + e1.buildArrayIdent(buf, arguments); + buf.writestring(Str); + buf.writestring("ass"); + } final void Exp_buildArrayIdent(OutBuffer buf, Expressions arguments, string Str) { @@ -2018,13 +2030,25 @@ buf.writestring(Str); } - final void AssignExp_buildArrayIdent(OutBuffer buf, Expressions arguments, string Str) - { - /* Evaluate assign expressions right to left - */ - e2.buildArrayIdent(buf, arguments); - e1.buildArrayIdent(buf, arguments); - buf.writestring(Str); - buf.writestring("ass"); + final Expression AssignExp_buildArrayLoop(AssignExpType)(Arguments fparams)// if (is (AssignExpType : AssignExp)) + { + /* Evaluate assign expressions right to left + */ + Expression ex2 = e2.buildArrayLoop(fparams); + Expression ex1 = e1.buildArrayLoop(fparams); + Argument param = cast(Argument)fparams.data[0]; + param.storageClass = STCundefined; + Expression e = new AssignExpType(Loc(0), ex1, ex2); + return e; } -} + + final Expression Exp_buildArrayLoop(ExpType)(Arguments fparams) if (is (ExpType : BinExp)) + { + /* Evaluate assign expressions left to right + */ + Expression ex1 = e1.buildArrayLoop(fparams); + Expression ex2 = e2.buildArrayLoop(fparams); + Expression e = new ExpType(Loc(0), ex1, ex2); + return e; + } +} \ No newline at end of file