Mercurial > projects > dang
diff gen/CodeGen.d @ 192:fda35d57847e
Fixed String parsing, so that they get created with the right type in AST.
Also added so that you can parse options to the test program, that will mirror them to Dang.
Eg.
./tests/run --semantic-only
will pass --semantic-only to Dang on each run.
author | Anders Johnsen <skabet@gmail.com> |
---|---|
date | Fri, 25 Jul 2008 15:00:54 +0200 |
parents | 08b6ce45b456 |
children | 4e1a7265d620 |
line wrap: on
line diff
--- a/gen/CodeGen.d Fri Jul 25 14:44:50 2008 +0200 +++ b/gen/CodeGen.d Fri Jul 25 15:00:54 2008 +0200 @@ -716,7 +716,7 @@ return LValue(v); case ExpType.StringExp: auto stringExp = cast(StringExp)exp; - char[] data = cast(char[])stringExp.data; + char[] data = cast(char[])stringExp.data.data; auto string_constant = ConstantArray.GetString(data, true); auto gv = m.addGlobal(string_constant, "string"); gv.linkage = Linkage.Internal;