Mercurial > projects > ddmd
comparison dmd/PragmaDeclaration.d @ 84:be2ab491772e
Expressions -> Vector!Expression
author | Eldar Insafutdinov <e.insafutdinov@gmail.com> |
---|---|
date | Mon, 30 Aug 2010 16:12:19 +0100 |
parents | ad4792a1cfd6 |
children | 39648eb578f6 |
comparison
equal
deleted
inserted
replaced
83:ee670dd808a8 | 84:be2ab491772e |
---|---|
75 { | 75 { |
76 if (!args || args.dim != 1) | 76 if (!args || args.dim != 1) |
77 error("string expected for library name"); | 77 error("string expected for library name"); |
78 else | 78 else |
79 { | 79 { |
80 Expression e = cast(Expression)args.data[0]; | 80 auto e = args[0]; |
81 | 81 |
82 e = e.semantic(sc); | 82 e = e.semantic(sc); |
83 e = e.optimize(WANTvalue | WANTinterpret); | 83 e = e.optimize(WANTvalue | WANTinterpret); |
84 args.data[0] = cast(void*)e; | 84 args[0] = e; |
85 if (e.op != TOKstring) | 85 if (e.op != TOKstring) |
86 error("string expected for library name, not '%s'", e.toChars()); | 86 error("string expected for library name, not '%s'", e.toChars()); |
87 else if (global.params.verbose) | 87 else if (global.params.verbose) |
88 { | 88 { |
89 StringExp se = cast(StringExp)e; | 89 StringExp se = cast(StringExp)e; |
132 { | 132 { |
133 if (!args || args.dim != 1) | 133 if (!args || args.dim != 1) |
134 error("function name expected for start address"); | 134 error("function name expected for start address"); |
135 else | 135 else |
136 { | 136 { |
137 Expression e = cast(Expression)args.data[0]; | 137 auto e = args[0]; |
138 e = e.semantic(sc); | 138 e = e.semantic(sc); |
139 e = e.optimize(WANTvalue | WANTinterpret); | 139 e = e.optimize(WANTvalue | WANTinterpret); |
140 args.data[0] = cast(void*)e; | 140 args[0] = e; |
141 Dsymbol sa = getDsymbol(e); | 141 Dsymbol sa = getDsymbol(e); |
142 if (!sa || !sa.isFuncDeclaration()) | 142 if (!sa || !sa.isFuncDeclaration()) |
143 error("function name expected for start address, not '%s'", e.toChars()); | 143 error("function name expected for start address, not '%s'", e.toChars()); |
144 } | 144 } |
145 goto Lnodecl; | 145 goto Lnodecl; |