Mercurial > projects > dil
changeset 600:041eae272362
Moved dil.Identifier to dil.lexer.Identifier.
author | Aziz K?ksal <aziz.koeksal@gmail.com> |
---|---|
date | Sun, 06 Jan 2008 00:52:20 +0100 |
parents | c4cdea3a65ba |
children | 9f96fd51cb41 |
files | trunk/src/dil/IdTable.d trunk/src/dil/Identifier.d trunk/src/dil/ast/Expressions.d trunk/src/dil/ast/Types.d trunk/src/dil/lexer/Identifier.d trunk/src/dil/lexer/Keywords.d trunk/src/dil/lexer/Lexer.d trunk/src/dil/lexer/Token.d trunk/src/dil/semantic/SymbolTable.d trunk/src/dil/semantic/Symbols.d trunk/src/dil/semantic/Types.d |
diffstat | 11 files changed, 56 insertions(+), 56 deletions(-) [+] |
line wrap: on
line diff
--- a/trunk/src/dil/IdTable.d Sun Jan 06 00:45:53 2008 +0100 +++ b/trunk/src/dil/IdTable.d Sun Jan 06 00:52:20 2008 +0100 @@ -9,7 +9,7 @@ import dil.lexer.Keywords; import common; -public import dil.Identifier; +public import dil.lexer.Identifier; public import dil.IdentsEnum; struct Ident
--- a/trunk/src/dil/Identifier.d Sun Jan 06 00:45:53 2008 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -/++ - Author: Aziz Köksal - License: GPL3 -+/ -module dil.Identifier; - -import dil.lexer.TokensEnum; -import dil.IdentsEnum; -import common; - -align(1) -struct Identifier -{ - string str; - TOK type; - ID identID; - - static Identifier* opCall(string str, TOK type) - { - auto id = new Identifier; - id.str = str; - id.type = type; - return id; - } - - static Identifier* opCall(string str, TOK type, ID identID) - { - auto id = new Identifier; - id.str = str; - id.type = type; - id.identID = identID; - return id; - } - - uint toHash() - { - uint hash; - foreach(c; str) { - hash *= 9; - hash += c; - } - return hash; - } -} -// pragma(msg, Identifier.sizeof.stringof);
--- a/trunk/src/dil/ast/Expressions.d Sun Jan 06 00:45:53 2008 +0100 +++ b/trunk/src/dil/ast/Expressions.d Sun Jan 06 00:52:20 2008 +0100 @@ -8,7 +8,7 @@ import dil.ast.Types; import dil.ast.Declarations; import dil.ast.Statements; -import dil.Identifier; +import dil.lexer.Identifier; import dil.semantic.Scope; import dil.semantic.Types; import common;
--- a/trunk/src/dil/ast/Types.d Sun Jan 06 00:45:53 2008 +0100 +++ b/trunk/src/dil/ast/Types.d Sun Jan 06 00:52:20 2008 +0100 @@ -6,8 +6,8 @@ import dil.ast.Node; import dil.ast.Expressions; +import dil.lexer.Identifier; import dil.Enums; -import dil.Identifier; import dil.semantic.Scope; import dil.semantic.Types;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/trunk/src/dil/lexer/Identifier.d Sun Jan 06 00:52:20 2008 +0100 @@ -0,0 +1,45 @@ +/++ + Author: Aziz Köksal + License: GPL3 ++/ +module dil.lexer.Identifier; + +import dil.lexer.TokensEnum; +import dil.IdentsEnum; +import common; + +align(1) +struct Identifier +{ + string str; + TOK type; + ID identID; + + static Identifier* opCall(string str, TOK type) + { + auto id = new Identifier; + id.str = str; + id.type = type; + return id; + } + + static Identifier* opCall(string str, TOK type, ID identID) + { + auto id = new Identifier; + id.str = str; + id.type = type; + id.identID = identID; + return id; + } + + uint toHash() + { + uint hash; + foreach(c; str) { + hash *= 9; + hash += c; + } + return hash; + } +} +// pragma(msg, Identifier.sizeof.stringof);
--- a/trunk/src/dil/lexer/Keywords.d Sun Jan 06 00:45:53 2008 +0100 +++ b/trunk/src/dil/lexer/Keywords.d Sun Jan 06 00:52:20 2008 +0100 @@ -5,7 +5,7 @@ module dil.lexer.Keywords; import dil.lexer.Token; -import dil.Identifier; +import dil.lexer.Identifier; /// Table of reserved identifiers. static const Identifier[] keywords = [
--- a/trunk/src/dil/lexer/Lexer.d Sun Jan 06 00:45:53 2008 +0100 +++ b/trunk/src/dil/lexer/Lexer.d Sun Jan 06 00:52:20 2008 +0100 @@ -6,7 +6,7 @@ import dil.lexer.Token; import dil.lexer.Keywords; -import dil.Identifier; +import dil.lexer.Identifier; import dil.Information; import dil.Messages; import dil.HtmlEntities;
--- a/trunk/src/dil/lexer/Token.d Sun Jan 06 00:45:53 2008 +0100 +++ b/trunk/src/dil/lexer/Token.d Sun Jan 06 00:52:20 2008 +0100 @@ -4,9 +4,9 @@ +/ module dil.lexer.Token; +import dil.lexer.Identifier; +import dil.lexer.Funcs; import dil.Location; -import dil.Identifier; -import dil.lexer.Funcs; import tango.stdc.stdlib : malloc, free; import tango.core.Exception; import common;
--- a/trunk/src/dil/semantic/SymbolTable.d Sun Jan 06 00:45:53 2008 +0100 +++ b/trunk/src/dil/semantic/SymbolTable.d Sun Jan 06 00:52:20 2008 +0100 @@ -5,7 +5,7 @@ module dil.semantic.SymbolTable; import dil.semantic.Symbol; -import dil.Identifier; +import dil.lexer.Identifier; import common; /++
--- a/trunk/src/dil/semantic/Symbols.d Sun Jan 06 00:45:53 2008 +0100 +++ b/trunk/src/dil/semantic/Symbols.d Sun Jan 06 00:52:20 2008 +0100 @@ -6,10 +6,10 @@ import dil.semantic.Symbol; import dil.semantic.SymbolTable; +import dil.semantic.Types; import dil.ast.Node; +import dil.lexer.Identifier; import dil.Enums; -import dil.semantic.Types; -import dil.Identifier; import common; /// A symbol that has its own scope with a symbol table.
--- a/trunk/src/dil/semantic/Types.d Sun Jan 06 00:45:53 2008 +0100 +++ b/trunk/src/dil/semantic/Types.d Sun Jan 06 00:52:20 2008 +0100 @@ -6,8 +6,8 @@ import dil.semantic.Symbol; import dil.semantic.TypesEnum; +import dil.lexer.Identifier; import dil.CompilerInfo; -import dil.Identifier; abstract class Type : Symbol {