Mercurial > projects > dang
view sema/LiteralInterpreter.d @ 168:7982eb63c0eb
Some changes to get function overloading to work. Also class inherit works now - to some extend. needs vtables and all the complex stuff of it.
author | Anders Johnsen <skabet@gmail.com> |
---|---|
date | Thu, 24 Jul 2008 12:06:48 +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; }