Mercurial > projects > dil
view trunk/src/dil/Scope.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 | e6c759e151cd |
children | 47be6bfe39cd |
line wrap: on
line source
/++ Author: Aziz Köksal License: GPL3 +/ module dil.Scope; import dil.Symbol; import dil.Information; import common; class Scope { Scope parent; /// The surrounding scope. InformationManager infoMan; /// Collects errors reported during the semantic phase. this() { } /++ Find an identifier in this scope. +/ Symbol find(char[] ident) { return null; } /++ Add a symbol to this scope. +/ void add(Symbol sym) { } /++ Create a new inner scope. +/ Scope push() { auto sc = new Scope(); sc.parent = this; return sc; } /++ Destroy this scope and return the outer scope. +/ Scope pop() { auto sc = parent; // delete this; return sc; } }