Mercurial > projects > dil
comparison trunk/src/dil/lexer/IdTable.d @ 707:efa5fcb9aa14
Added semantic code related to enums.
Added member symbol to EnumMemberDeclaration.
Added genAnonEnumID() to IdTable.
Added class EnumMember.
Wrote code for SemanticPass2.visit(EnumDeclaration).
Revised code in SemanticPass1.visit(EnumDeclaration).
author | Aziz K?ksal <aziz.koeksal@gmail.com> |
---|---|
date | Tue, 29 Jan 2008 01:07:39 +0100 |
parents | 07946b379006 |
children | 140469ecb90e |
comparison
equal
deleted
inserted
replaced
706:684ec5932b2e | 707:efa5fcb9aa14 |
---|---|
137 do | 137 do |
138 str = cast(char)('0' + (x % 10)) ~ str; | 138 str = cast(char)('0' + (x % 10)) ~ str; |
139 while (x /= 10) | 139 while (x /= 10) |
140 return Identifier(str, TOK.Identifier); | 140 return Identifier(str, TOK.Identifier); |
141 } | 141 } |
142 | |
143 Identifier* genAnonEnumID() | |
144 { | |
145 return genAnonymousID("__anonenum"); | |
146 } | |
142 } | 147 } |
143 | 148 |
144 unittest | 149 unittest |
145 { | 150 { |
146 // TODO: write benchmark. | 151 // TODO: write benchmark. |