Mercurial > projects > dang
diff sema/SymbolTableBuilder.d @ 56:4ae365eff712 new_gen
Now return types works for structs... Also, simplyfing in AST have been startet - but still messy. This update is a little messy...
author | Anders Johnsen <skabet@gmail.com> |
---|---|
date | Mon, 28 Apr 2008 21:40:00 +0200 |
parents | 79cb0afafabe |
children | 1d6f4ad38a91 |
line wrap: on
line diff
--- a/sema/SymbolTableBuilder.d Sat Apr 26 23:11:13 2008 +0200 +++ b/sema/SymbolTableBuilder.d Mon Apr 28 21:40:00 2008 +0200 @@ -97,12 +97,14 @@ override void visitStmt(Stmt s) { s.env = current(); + s.stmtIndex = s.env.stmtIndex; super.visitStmt(s); } override void visitExp(Exp e) { e.env = current(); + e.stmtIndex = e.env.stmtIndex; super.visitExp(e); } @@ -114,11 +116,14 @@ visitExp(d.type); visitExp(d.identifier); d.env = current(); - sc.parentFunction = sym; + sc.parentFunction = d; foreach (arg; d.funcArgs) visitDecl(arg); foreach (stmt; d.statements) + { + sc.currentStmtIndex++; visitStmt(stmt); + } pop(sc); }