Mercurial > projects > dil
comparison trunk/src/dil/semantic/Analysis.d @ 684:10b314bf37e3
Added module dil.semantic.Pass2.
author | Aziz K?ksal <aziz.koeksal@gmail.com> |
---|---|
date | Mon, 21 Jan 2008 18:40:55 +0100 |
parents | 64fec49651cf |
children | 78be32e3e157 |
comparison
equal
deleted
inserted
replaced
683:1ae72234db26 | 684:10b314bf37e3 |
---|---|
29 if (args.length == 0) | 29 if (args.length == 0) |
30 return /*scop.error(pragmaLoc, "expected expression arguments to pragma")*/; | 30 return /*scop.error(pragmaLoc, "expected expression arguments to pragma")*/; |
31 | 31 |
32 foreach (arg; args) | 32 foreach (arg; args) |
33 { | 33 { |
34 auto e = arg.evaluate(); | 34 auto e = arg/+.evaluate()+/; |
35 if (e is null) | 35 if (e is null) |
36 { | 36 { |
37 // scop.error(e.begin, "expression is not evaluatable at compile time"); | 37 // scop.error(e.begin, "expression is not evaluatable at compile time"); |
38 } | 38 } |
39 else if (auto stringExpr = e.Is!(StringExpression)) | 39 else if (auto stringExpr = e.Is!(StringExpression)) |
52 void pragma_lib(Scope scop, Token* pragmaLoc, Expression[] args) | 52 void pragma_lib(Scope scop, Token* pragmaLoc, Expression[] args) |
53 { | 53 { |
54 if (args.length != 1) | 54 if (args.length != 1) |
55 return /*scop.error(pragmaLoc, "expected one expression argument to pragma")*/; | 55 return /*scop.error(pragmaLoc, "expected one expression argument to pragma")*/; |
56 | 56 |
57 auto e = args[0].evaluate(); | 57 auto e = args[0]/+.evaluate()+/; |
58 if (e is null) | 58 if (e is null) |
59 { | 59 { |
60 // scop.error(e.begin, "expression is not evaluatable at compile time"); | 60 // scop.error(e.begin, "expression is not evaluatable at compile time"); |
61 } | 61 } |
62 else if (auto stringExpr = e.Is!(StringExpression)) | 62 else if (auto stringExpr = e.Is!(StringExpression)) |