1
|
1
|
|
2 // Copyright (c) 1999-2005 by Digital Mars
|
|
3 // All Rights Reserved
|
|
4 // written by Walter Bright
|
|
5 // www.digitalmars.com
|
|
6 // License for redistribution is by either the Artistic License
|
|
7 // in artistic.txt, or the GNU General Public License in gnu.txt.
|
|
8 // See the included readme.txt for details.
|
|
9
|
|
10 // stubbed out for dmdfe. Original is in dmd/tocsym.c
|
|
11
|
|
12 #include <stddef.h>
|
|
13
|
|
14 #include "mars.h"
|
|
15 #include "module.h"
|
|
16 #include "mtype.h"
|
|
17 #include "declaration.h"
|
|
18 #include "statement.h"
|
|
19 #include "enum.h"
|
|
20 #include "aggregate.h"
|
|
21 #include "init.h"
|
|
22 #include "attrib.h"
|
|
23 #include "lexer.h"
|
|
24
|
|
25 /********************************* SymbolDeclaration ****************************/
|
|
26
|
|
27 SymbolDeclaration::SymbolDeclaration(Loc loc, Symbol *s, StructDeclaration *dsym)
|
|
28 : Declaration(new Identifier("", TOKidentifier))
|
|
29 {
|
|
30 }
|
|
31
|
|
32 Symbol *SymbolDeclaration::toSymbol()
|
|
33 {
|
|
34 return sym;
|
|
35 }
|
|
36
|
|
37 /*************************************
|
|
38 * Helper
|
|
39 */
|
|
40
|
|
41 Symbol *Dsymbol::toSymbolX(const char *prefix, int sclass, TYPE *t, const char *suffix)
|
|
42 {
|
|
43 return 0;
|
|
44 }
|
|
45
|
|
46 /*************************************
|
|
47 */
|
|
48
|
|
49 Symbol *Dsymbol::toSymbol()
|
|
50 {
|
|
51 return 0;
|
|
52 }
|
|
53
|
|
54 /*********************************
|
|
55 * Generate import symbol from symbol.
|
|
56 */
|
|
57
|
|
58 Symbol *Dsymbol::toImport()
|
|
59 {
|
|
60 return 0;
|
|
61 }
|
|
62
|
|
63 /*************************************
|
|
64 */
|
|
65
|
|
66 Symbol *Dsymbol::toImport(Symbol *sym)
|
|
67 {
|
|
68 return 0;
|
|
69 }
|
|
70
|
|
71 /*************************************
|
|
72 */
|
|
73
|
|
74 Symbol *VarDeclaration::toSymbol()
|
|
75 {
|
|
76 return 0;
|
|
77 }
|
|
78
|
|
79 /*************************************
|
|
80 */
|
|
81
|
|
82 Symbol *ClassInfoDeclaration::toSymbol()
|
|
83 {
|
|
84 return 0;
|
|
85 }
|
|
86
|
|
87 /*************************************
|
|
88 */
|
|
89
|
|
90 Symbol *ModuleInfoDeclaration::toSymbol()
|
|
91 {
|
|
92 return 0;
|
|
93 }
|
|
94
|
|
95 /*************************************
|
|
96 */
|
|
97
|
|
98 Symbol *TypeInfoDeclaration::toSymbol()
|
|
99 {
|
|
100 return 0;
|
|
101 }
|
|
102
|
|
103 /*************************************
|
|
104 */
|
|
105
|
|
106 Symbol *FuncDeclaration::toSymbol()
|
|
107 {
|
|
108
|
|
109 return 0;
|
|
110 }
|
|
111
|
|
112 /*************************************
|
|
113 */
|
|
114
|
|
115 Symbol *FuncDeclaration::toThunkSymbol(int offset)
|
|
116 {
|
|
117 return 0;
|
|
118 }
|
|
119
|
|
120 /*************************************
|
|
121 */
|
|
122
|
|
123 Symbol *FuncAliasDeclaration::toSymbol()
|
|
124 {
|
|
125
|
|
126 return 0;
|
|
127 }
|
|
128
|
|
129
|
|
130 /****************************************
|
|
131 * Create a static symbol we can hang DT initializers onto.
|
|
132 */
|
|
133
|
|
134 Symbol *static_sym()
|
|
135 {
|
|
136 return 0;
|
|
137 }
|
|
138
|
|
139 /*************************************
|
|
140 * Create the "ClassInfo" symbol
|
|
141 */
|
|
142
|
|
143 Symbol *ClassDeclaration::toSymbol()
|
|
144 {
|
|
145 return 0;
|
|
146 }
|
|
147
|
|
148 /*************************************
|
|
149 * Create the "InterfaceInfo" symbol
|
|
150 */
|
|
151
|
|
152 Symbol *InterfaceDeclaration::toSymbol()
|
|
153 {
|
|
154 return 0;
|
|
155 }
|
|
156
|
|
157 /*************************************
|
|
158 * Create the "ModuleInfo" symbol
|
|
159 */
|
|
160
|
|
161 Symbol *Module::toSymbol()
|
|
162 {
|
|
163 return 0;
|
|
164 }
|
|
165
|
|
166 /*************************************
|
|
167 * This is accessible via the ClassData, but since it is frequently
|
|
168 * needed directly (like for rtti comparisons), make it directly accessible.
|
|
169 */
|
|
170
|
|
171 Symbol *ClassDeclaration::toVtblSymbol()
|
|
172 {
|
|
173 return 0;
|
|
174 }
|
|
175
|
|
176 /**********************************
|
|
177 * Create the static initializer for the struct/class.
|
|
178 */
|
|
179
|
|
180 Symbol *AggregateDeclaration::toInitializer()
|
|
181 {
|
|
182 return 0;
|
|
183 }
|
|
184
|
|
185
|
|
186 /******************************************
|
|
187 */
|
|
188
|
|
189 Symbol *Module::toModuleAssert()
|
|
190 {
|
|
191 return 0;
|
|
192 }
|
|
193
|
|
194 /******************************************
|
|
195 */
|
|
196
|
|
197 Symbol *Module::toModuleArray()
|
|
198 {
|
|
199 return 0;
|
|
200 }
|
|
201
|
|
202 /********************************************
|
|
203 * Determine the right symbol to look up
|
|
204 * an associative array element.
|
|
205 * Input:
|
|
206 * flags 0 don't add value signature
|
|
207 * 1 add value signature
|
|
208 */
|
|
209
|
|
210 Symbol *TypeAArray::aaGetSymbol(char *func, int flags)
|
|
211 {
|
|
212 return 0;
|
|
213 }
|
|
214
|