Mercurial > projects > dang
view sema/LiteralInterpreter.d @ 164:ba94fd563548
The symbol for the constructor a "new"-exp is calling is now stored in callSym in NewExp.
author | Anders Johnsen <skabet@gmail.com> |
---|---|
date | Tue, 22 Jul 2008 16:53:47 +0200 |
parents | 6cb2f4201e2a |
children | fda35d57847e |
line wrap: on
line source
module sema.LiteralInterpreter; import sema.Visitor; import basic.LiteralParsing, basic.Message; class LiteralInterpreter : Visitor!(void) { this(MessageHandler messages) { this.messages = messages; } void visit(Module[] modules) { super.visit(modules); messages.checkErrors(); } void visitStringExp(StringExp exp) { auto str = parseString(exp.str, exp.loc, messages); exp.data = str.data; } void visitIntegerLit(IntegerLit exp) { exp.number = parseNumber(exp.name, exp.loc, messages); } MessageHandler messages; }