# HG changeset patch # User Aziz K?ksal # Date 1201618623 -3600 # Node ID 3a4c7d44446729571878153b20737b42cf2ca0c5 # Parent efa5fcb9aa14f00d695387b8d835964818fad807 Added method interpret() to class SemanticPass2. diff -r efa5fcb9aa14 -r 3a4c7d444467 trunk/src/dil/semantic/Pass2.d --- a/trunk/src/dil/semantic/Pass2.d Tue Jan 29 01:07:39 2008 +0100 +++ b/trunk/src/dil/semantic/Pass2.d Tue Jan 29 15:57:03 2008 +0100 @@ -56,6 +56,11 @@ scop = scop.exit(); } + Expression interpret(Expression e) + { + return Interpreter.interpret(e, modul.infoMan, scop); + } + void error(Token* token, char[] formatMsg, ...) { auto location = token.getErrorLocation(); @@ -93,7 +98,7 @@ if (member.value) { member.value = visitE(member.value); - finalValue = Interpreter.interpret(member.value, modul.infoMan, scop); + finalValue = interpret(member.value); if (finalValue is Interpreter.NAR) continue; } @@ -112,7 +117,7 @@ if (md.isMixinExpression) { md.argument = visitE(md.argument); - auto expr = Interpreter.interpret(md.argument, modul.infoMan, scop); + auto expr = interpret(md.argument); if (expr is Interpreter.NAR) return md; auto stringExpr = expr.Is!(StringExpression); @@ -296,7 +301,7 @@ if (me.type) return me.expr; me.expr = visitE(me.expr); - auto expr = Interpreter.interpret(me.expr, modul.infoMan, scop); + auto expr = interpret(me.expr); if (expr is Interpreter.NAR) return me; auto stringExpr = expr.Is!(StringExpression); @@ -320,7 +325,7 @@ if (ie.type) return ie.expr; ie.expr = visitE(ie.expr); - auto expr = Interpreter.interpret(ie.expr, modul.infoMan, scop); + auto expr = interpret(ie.expr); if (expr is Interpreter.NAR) return ie; auto stringExpr = expr.Is!(StringExpression);