Mercurial > projects > dil
diff trunk/src/dil/Scope.d @ 430:e6c759e151cd
Fixed a few things regarding encoding/decoding UTF-8 sequences.
When an escape sequence was scanned with an invalid Unicode code point
then an error is reported and REPLACEMENT_CHAR is encoded instead.
The same is done when an invalid UTF-8 sequence was encountered.
Added a few stub methods to class Scope.
author | Aziz K?ksal <aziz.koeksal@gmail.com> |
---|---|
date | Wed, 03 Oct 2007 23:00:46 +0200 |
parents | 5431c0faf3b5 |
children | bd176bc73e43 |
line wrap: on
line diff
--- a/trunk/src/dil/Scope.d Wed Oct 03 17:13:50 2007 +0200 +++ b/trunk/src/dil/Scope.d Wed Oct 03 23:00:46 2007 +0200 @@ -3,9 +3,50 @@ License: GPL3 +/ module dil.Scope; +import dil.Symbol; import common; class Scope { + Scope parent; /// The surrounding scope. + this() + { + } + + /++ + Find an identifier in this scope. + +/ + Symbol find(char[] ident) + { + + } + + /++ + 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; + } }