Mercurial > projects > dil
changeset 589:de365ddcfbd4
Moved dil.Symbol to dil.semantic.Symbol.
author | Aziz K?ksal <aziz.koeksal@gmail.com> |
---|---|
date | Sat, 05 Jan 2008 23:40:54 +0100 |
parents | dcfec202718d |
children | 641041912670 |
files | trunk/src/dil/Module.d trunk/src/dil/Scope.d trunk/src/dil/Symbol.d trunk/src/dil/SymbolTable.d trunk/src/dil/Symbols.d trunk/src/dil/semantic/Symbol.d trunk/src/dil/semantic/Types.d |
diffstat | 7 files changed, 52 insertions(+), 52 deletions(-) [+] |
line wrap: on
line diff
--- a/trunk/src/dil/Module.d Sat Jan 05 23:18:36 2008 +0100 +++ b/trunk/src/dil/Module.d Sat Jan 05 23:40:54 2008 +0100 @@ -11,7 +11,7 @@ import dil.lexer.Lexer; import dil.File; import dil.Scope; -import dil.Symbol; +import dil.semantic.Symbol; import dil.Symbols; import dil.Information; import tango.io.FilePath;
--- a/trunk/src/dil/Scope.d Sat Jan 05 23:18:36 2008 +0100 +++ b/trunk/src/dil/Scope.d Sat Jan 05 23:40:54 2008 +0100 @@ -4,7 +4,7 @@ +/ module dil.Scope; -import dil.Symbol; +import dil.semantic.Symbol; import dil.Symbols; import dil.Information; import dil.Messages;
--- a/trunk/src/dil/Symbol.d Sat Jan 05 23:18:36 2008 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/++ - Author: Aziz Köksal - License: GPL3 -+/ -module dil.Symbol; - -import dil.ast.Node; -import common; - -/// Symbol IDs. -enum SYM -{ - Module, - Class, - Interface, - Struct, - Union, - Variable, - Function, - Type, -} - -/++ - A symbol represents an object with semantic code information. -+/ -class Symbol -{ - SYM sid; - Symbol parent; /// The parent this symbol belongs to. - /// The AST node that produced this symbol. - /// Useful for source code location info and retrieval of doc comments. - Node node; - - // A template macro for building isXYZ() methods. - private template is_(char[] kind) - { - const char[] is_ = `bool is`~kind~`(){ return sid == SYM.`~kind~`; }`; - } - mixin(is_!("Module")); - mixin(is_!("Class")); - mixin(is_!("Interface")); - mixin(is_!("Struct")); - mixin(is_!("Union")); - mixin(is_!("Variable")); - mixin(is_!("Function")); - mixin(is_!("Type")); -}
--- a/trunk/src/dil/SymbolTable.d Sat Jan 05 23:18:36 2008 +0100 +++ b/trunk/src/dil/SymbolTable.d Sat Jan 05 23:40:54 2008 +0100 @@ -4,7 +4,7 @@ +/ module dil.SymbolTable; -import dil.Symbol; +import dil.semantic.Symbol; import dil.Identifier; import common;
--- a/trunk/src/dil/Symbols.d Sat Jan 05 23:18:36 2008 +0100 +++ b/trunk/src/dil/Symbols.d Sat Jan 05 23:40:54 2008 +0100 @@ -4,7 +4,7 @@ +/ module dil.Symbols; -import dil.Symbol; +import dil.semantic.Symbol; import dil.SymbolTable; import dil.ast.Node; import dil.Enums;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/trunk/src/dil/semantic/Symbol.d Sat Jan 05 23:40:54 2008 +0100 @@ -0,0 +1,47 @@ +/++ + Author: Aziz Köksal + License: GPL3 ++/ +module dil.semantic.Symbol; + +import dil.ast.Node; +import common; + +/// Symbol IDs. +enum SYM +{ + Module, + Class, + Interface, + Struct, + Union, + Variable, + Function, + Type, +} + +/++ + A symbol represents an object with semantic code information. ++/ +class Symbol +{ + SYM sid; + Symbol parent; /// The parent this symbol belongs to. + /// The AST node that produced this symbol. + /// Useful for source code location info and retrieval of doc comments. + Node node; + + // A template macro for building isXYZ() methods. + private template is_(char[] kind) + { + const char[] is_ = `bool is`~kind~`(){ return sid == SYM.`~kind~`; }`; + } + mixin(is_!("Module")); + mixin(is_!("Class")); + mixin(is_!("Interface")); + mixin(is_!("Struct")); + mixin(is_!("Union")); + mixin(is_!("Variable")); + mixin(is_!("Function")); + mixin(is_!("Type")); +}