Mercurial > projects > dang
comparison sema/ScopeCheck.d @ 172:01c2c49775ef
- Changed Parser to be more clean on type parsing.
- Parsing int function(int), and the like, types.(Function pointers)
- Fixed a design fault that made Symbol be wrong. Now Symbols are created with a factory with the help of types.
author | Anders Johnsen <skabet@gmail.com> |
---|---|
date | Thu, 24 Jul 2008 20:31:24 +0200 |
parents | 7982eb63c0eb |
children |
comparison
equal
deleted
inserted
replaced
171:f0385c044065 | 172:01c2c49775ef |
---|---|
27 .arg(i.get); | 27 .arg(i.get); |
28 } | 28 } |
29 | 29 |
30 override void visitVarDecl(VarDecl d) | 30 override void visitVarDecl(VarDecl d) |
31 { | 31 { |
32 if(!d.env.findType(d.varType.get)) | 32 if(d.identifier.get is null) |
33 messages.report(UndefinedType, d.varType.loc) | 33 messages.report(UndefinedType, d.varType.loc) |
34 .arg(d.varType.get); | 34 .arg(d.varType.get); |
35 | 35 |
36 auto env = d.env; | 36 auto env = d.env; |
37 if (d.env.enclosing) | 37 if (d.env.enclosing) |