comparison trunk/src/dil/semantic/Symbols.d @ 798:c24be8d4f6ab

Added documentation comments.
author Aziz K?ksal <aziz.koeksal@gmail.com>
date Sat, 01 Mar 2008 02:53:06 +0100
parents f4b9680c0e16
children
comparison
equal deleted inserted replaced
797:cf2ad5df025c 798:c24be8d4f6ab
66 funcs ~= cast(Function)cast(void*)s; 66 funcs ~= cast(Function)cast(void*)s;
67 super.insert(s, ident); 67 super.insert(s, ident);
68 } 68 }
69 } 69 }
70 70
71 /// A class symbol.
71 class Class : Aggregate 72 class Class : Aggregate
72 { 73 {
73 this(Identifier* name, Node classNode) 74 this(Identifier* name, Node classNode)
74 { 75 {
75 super(SYM.Class, name, classNode); 76 super(SYM.Class, name, classNode);
76 } 77 }
77 } 78 }
78 79
80 /// An interface symbol.
79 class Interface : Aggregate 81 class Interface : Aggregate
80 { 82 {
81 this(Identifier* name, Node interfaceNode) 83 this(Identifier* name, Node interfaceNode)
82 { 84 {
83 super(SYM.Interface, name, interfaceNode); 85 super(SYM.Interface, name, interfaceNode);
84 } 86 }
85 } 87 }
86 88
89 /// A union symbol.
87 class Union : Aggregate 90 class Union : Aggregate
88 { 91 {
89 this(Identifier* name, Node unionNode) 92 this(Identifier* name, Node unionNode)
90 { 93 {
91 super(SYM.Union, name, unionNode); 94 super(SYM.Union, name, unionNode);
92 } 95 }
93 } 96 }
94 97
98 /// A struct symbol.
95 class Struct : Aggregate 99 class Struct : Aggregate
96 { 100 {
97 this(Identifier* name, Node structNode) 101 this(Identifier* name, Node structNode)
98 { 102 {
99 super(SYM.Struct, name, structNode); 103 super(SYM.Struct, name, structNode);
100 } 104 }
101 } 105 }
102 106
107 /// An enum symbol.
103 class Enum : ScopeSymbol 108 class Enum : ScopeSymbol
104 { 109 {
105 TypeEnum type; 110 TypeEnum type;
106 this(Identifier* name, Node enumNode) 111 this(Identifier* name, Node enumNode)
107 { 112 {
112 { 117 {
113 this.type = type; 118 this.type = type;
114 } 119 }
115 } 120 }
116 121
122 /// A template symbol.
117 class Template : ScopeSymbol 123 class Template : ScopeSymbol
118 { 124 {
119 this(Identifier* name, Node templateNode) 125 this(Identifier* name, Node templateNode)
120 { 126 {
121 super(SYM.Template, name, templateNode); 127 super(SYM.Template, name, templateNode);
122 } 128 }
123 } 129 }
124 130
131 /// A function symbol.
125 class Function : ScopeSymbol 132 class Function : ScopeSymbol
126 { 133 {
127 Protection prot; /// The protection. 134 Protection prot; /// The protection.
128 StorageClass stc; /// The storage classes. 135 StorageClass stc; /// The storage classes.
129 LinkageType linkType; /// The linkage type. 136 LinkageType linkType; /// The linkage type.
135 { 142 {
136 super(SYM.Function, name, functionNode); 143 super(SYM.Function, name, functionNode);
137 } 144 }
138 } 145 }
139 146
147 /// A variable symbol.
140 class Variable : Symbol 148 class Variable : Symbol
141 { 149 {
142 Protection prot; /// The protection. 150 Protection prot; /// The protection.
143 StorageClass stc; /// The storage classes. 151 StorageClass stc; /// The storage classes.
144 LinkageType linkType; /// The linkage type. 152 LinkageType linkType; /// The linkage type.
156 this.stc = stc; 164 this.stc = stc;
157 this.linkType = linkType; 165 this.linkType = linkType;
158 } 166 }
159 } 167 }
160 168
169 /// An enum member symbol.
161 class EnumMember : Variable 170 class EnumMember : Variable
162 { 171 {
163 this(Identifier* name, 172 this(Identifier* name,
164 Protection prot, StorageClass stc, LinkageType linkType, 173 Protection prot, StorageClass stc, LinkageType linkType,
165 Node enumMemberNode) 174 Node enumMemberNode)
167 super(name, prot, stc, linkType, enumMemberNode); 176 super(name, prot, stc, linkType, enumMemberNode);
168 this.sid = SYM.EnumMember; 177 this.sid = SYM.EnumMember;
169 } 178 }
170 } 179 }
171 180
181 /// An alias symbol.
172 class Alias : Symbol 182 class Alias : Symbol
173 { 183 {
174 this(Identifier* name, Node aliasNode) 184 this(Identifier* name, Node aliasNode)
175 { 185 {
176 super(SYM.Alias, name, aliasNode); 186 super(SYM.Alias, name, aliasNode);
177 } 187 }
178 } 188 }
179 189
180 /++ 190 /// A list of symbols that share the same identifier.
181 A list of symbols that share the same identifier. 191 ///
182 These can be functions, templates and aggregates with template parameter lists. 192 /// These can be functions, templates and aggregates with template parameter lists.
183 +/
184 class OverloadSet : Symbol 193 class OverloadSet : Symbol
185 { 194 {
186 Symbol[] symbols; 195 Symbol[] symbols;
187 196
188 this(Identifier* name, Node node) 197 this(Identifier* name, Node node)