Mercurial > projects > dil
diff trunk/src/dil/Declarations.d @ 486:bd176bc73e43
Fixed a few things in the Parser.
Refactored some code that used parseArguments() to using parseExpressionList().
Added calls to set() and tidied up the code of the Parser a bit.
Fixed parsing DotIdentifier in parseAsmPrimaryExpression().
Added charLiteral member to class CharExpression.
Added class InformationManager. Added member infoMan to class Scope.
author | Aziz K?ksal <aziz.koeksal@gmail.com> |
---|---|
date | Sat, 01 Dec 2007 18:22:56 +0100 |
parents | c78a54b2617c |
children | a7291d3ee9d7 |
line wrap: on
line diff
--- a/trunk/src/dil/Declarations.d Fri Nov 30 20:17:29 2007 +0100 +++ b/trunk/src/dil/Declarations.d Sat Dec 01 18:22:56 2007 +0100 @@ -8,6 +8,7 @@ import dil.Types; import dil.Statements; import dil.Token; +import dil.Scope; abstract class Declaration : Node { @@ -17,6 +18,13 @@ super(NodeCategory.Declaration); this.hasBody = hasBody; } + + void semantic(Scope sc) + { +// foreach (node; this.children) +// if (node.category == NodeCategory.Declaration) +// (cast(Declaration)cast(void*)node).semantic(sc); + } } class Declarations : Declaration @@ -32,6 +40,11 @@ this.children ~= d; } + void opCatAssign(Declaration[] decls) + { + this.children ~= decls; + } + void opCatAssign(Declarations ds) { this.children ~= ds.children;