comparison 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
comparison
equal deleted inserted replaced
122:c77e9f4f1793 123:9e39c7de8438
670 assert(false); 670 assert(false);
671 } 671 }
672 672
673 void scanForNestedRef(Scope sc) 673 void scanForNestedRef(Scope sc)
674 { 674 {
675 assert(false); 675 e1.scanForNestedRef(sc);
676 e2.scanForNestedRef(sc);
676 } 677 }
677 678
678 Expression interpretCommon(InterState istate, Expression function(Type, Expression, Expression) fp) 679 Expression interpretCommon(InterState istate, Expression function(Type, Expression, Expression) fp)
679 { 680 {
680 Expression e; 681 Expression e;
1957 case TOK.TOKunord: 1958 case TOK.TOKunord:
1958 case TOK.TOKlg: 1959 case TOK.TOKlg:
1959 case TOK.TOKleg: 1960 case TOK.TOKleg:
1960 case TOK.TOKue: 1961 case TOK.TOKue:
1961 break; 1962 break;
1963 default:
1964 break; ///
1962 } 1965 }
1963 1966
1964 return e; 1967 return e;
1965 } 1968 }
1966 } 1969 }
2006 elem* e = el_bin(op,tym,el,er); 2009 elem* e = el_bin(op,tym,el,er);
2007 el_setLoc(e,loc); 2010 el_setLoc(e,loc);
2008 2011
2009 return e; 2012 return e;
2010 } 2013 }
2014 final void AssignExp_buildArrayIdent(OutBuffer buf, Expressions arguments, string Str)
2015 {
2016 /* Evaluate assign expressions right to left
2017 */
2018 e2.buildArrayIdent(buf, arguments);
2019 e1.buildArrayIdent(buf, arguments);
2020 buf.writestring(Str);
2021 buf.writestring("ass");
2022 }
2011 2023
2012 final void Exp_buildArrayIdent(OutBuffer buf, Expressions arguments, string Str) 2024 final void Exp_buildArrayIdent(OutBuffer buf, Expressions arguments, string Str)
2013 { 2025 {
2014 /* Evaluate assign expressions left to right 2026 /* Evaluate assign expressions left to right
2015 */ 2027 */
2016 e1.buildArrayIdent(buf, arguments); 2028 e1.buildArrayIdent(buf, arguments);
2017 e2.buildArrayIdent(buf, arguments); 2029 e2.buildArrayIdent(buf, arguments);
2018 buf.writestring(Str); 2030 buf.writestring(Str);
2019 } 2031 }
2020 2032
2021 final void AssignExp_buildArrayIdent(OutBuffer buf, Expressions arguments, string Str) 2033 final Expression AssignExp_buildArrayLoop(AssignExpType)(Arguments fparams)// if (is (AssignExpType : AssignExp))
2022 { 2034 {
2023 /* Evaluate assign expressions right to left 2035 /* Evaluate assign expressions right to left
2024 */ 2036 */
2025 e2.buildArrayIdent(buf, arguments); 2037 Expression ex2 = e2.buildArrayLoop(fparams);
2026 e1.buildArrayIdent(buf, arguments); 2038 Expression ex1 = e1.buildArrayLoop(fparams);
2027 buf.writestring(Str); 2039 Argument param = cast(Argument)fparams.data[0];
2028 buf.writestring("ass"); 2040 param.storageClass = STCundefined;
2041 Expression e = new AssignExpType(Loc(0), ex1, ex2);
2042 return e;
2043 }
2044
2045 final Expression Exp_buildArrayLoop(ExpType)(Arguments fparams) if (is (ExpType : BinExp))
2046 {
2047 /* Evaluate assign expressions left to right
2048 */
2049 Expression ex1 = e1.buildArrayLoop(fparams);
2050 Expression ex2 = e2.buildArrayLoop(fparams);
2051 Expression e = new ExpType(Loc(0), ex1, ex2);
2052 return e;
2029 } 2053 }
2030 } 2054 }