Mercurial > projects > dil
changeset 691:276e2866f5fd
Added static interpret() method to Interpreter.
author | Aziz K?ksal <aziz.koeksal@gmail.com> |
---|---|
date | Tue, 22 Jan 2008 18:05:37 +0100 |
parents | eaf6444b6284 |
children | d33895f679eb |
files | trunk/src/dil/semantic/Interpreter.d |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/trunk/src/dil/semantic/Interpreter.d Tue Jan 22 15:40:27 2008 +0100 +++ b/trunk/src/dil/semantic/Interpreter.d Tue Jan 22 18:05:37 2008 +0100 @@ -35,8 +35,14 @@ CantInterpret.type = Types.Error; } - this(InfoManager infoMan) + static Expression interpret(Expression e, InfoManager infoMan, Scope scop) { + return (new Interpreter(scop, infoMan)).start(e); + } + + this(Scope scop, InfoManager infoMan) + { + this.scop = scop; this.infoMan = infoMan; }