@@ -34,13 +34,7 @@ public IReadOnlyList<Declaration> Load()
34
34
return new List < Declaration > ( ) ;
35
35
}
36
36
37
- var informationModule = _finder . FindStdModule ( "Information" , vba , true ) ;
38
- Debug . Assert ( informationModule != null , "We expect the information module to exist in the VBA project." ) ;
39
-
40
- var debugDeclarations = LoadDebugDeclarations ( vba ) ;
41
- var specialFormDeclarations = LoadSpecialFormDeclarations ( informationModule ) ;
42
-
43
- return debugDeclarations . Concat ( specialFormDeclarations ) . ToList ( ) ;
37
+ return LoadDebugDeclarations ( vba ) ;
44
38
}
45
39
46
40
private static bool ThereIsAGlobalBuiltInErrVariableDeclaration ( DeclarationFinder finder )
@@ -161,179 +155,5 @@ private static SubroutineDeclaration DebugPrintDeclaration(ClassModuleDeclaratio
161
155
new Attributes ( ) ) ;
162
156
}
163
157
164
-
165
- private List < Declaration > LoadSpecialFormDeclarations ( Declaration parentModule )
166
- {
167
- Debug . Assert ( parentModule != null ) ;
168
-
169
- var arrayFunction = ArrayFunction ( parentModule ) ;
170
- var inputFunction = InputFunction ( parentModule ) ;
171
- var inputBFunction = InputBFunction ( parentModule ) ;
172
- var lboundFunction = LBoundFunction ( parentModule ) ;
173
- var uboundFunction = UBoundFunction ( parentModule ) ;
174
-
175
- return new List < Declaration > {
176
- arrayFunction ,
177
- inputFunction ,
178
- inputBFunction ,
179
- lboundFunction ,
180
- uboundFunction
181
- } ;
182
- }
183
-
184
- private static FunctionDeclaration ArrayFunction ( Declaration parentModule )
185
- {
186
- return new FunctionDeclaration (
187
- new QualifiedMemberName ( parentModule . QualifiedName . QualifiedModuleName , "Array" ) ,
188
- parentModule ,
189
- parentModule ,
190
- "Variant" ,
191
- null ,
192
- null ,
193
- Accessibility . Public ,
194
- null ,
195
- Selection . Home ,
196
- false ,
197
- true ,
198
- null ,
199
- new Attributes ( ) ) ;
200
- }
201
-
202
- private static SubroutineDeclaration InputFunction ( Declaration parentModule )
203
- {
204
- var inputFunction = InputFunctionWithoutParameters ( parentModule ) ;
205
- inputFunction . AddParameter ( NumberParameter ( parentModule , inputFunction ) ) ;
206
- inputFunction . AddParameter ( FileNumberParameter ( parentModule , inputFunction ) ) ;
207
- return inputFunction ;
208
- }
209
-
210
- private static SubroutineDeclaration InputFunctionWithoutParameters ( Declaration parentModule )
211
- {
212
- return new SubroutineDeclaration (
213
- new QualifiedMemberName ( parentModule . QualifiedName . QualifiedModuleName , "Input" ) ,
214
- parentModule ,
215
- parentModule ,
216
- "Variant" ,
217
- Accessibility . Public ,
218
- null ,
219
- Selection . Home ,
220
- true ,
221
- null ,
222
- new Attributes ( ) ) ;
223
- }
224
-
225
- private static ParameterDeclaration NumberParameter ( Declaration parentModule , SubroutineDeclaration ParentSubroutine )
226
- {
227
- return new ParameterDeclaration (
228
- new QualifiedMemberName ( parentModule . QualifiedName . QualifiedModuleName , "Number" ) ,
229
- ParentSubroutine ,
230
- "Integer" ,
231
- null ,
232
- null ,
233
- false ,
234
- false ) ;
235
- }
236
-
237
- private static ParameterDeclaration FileNumberParameter ( Declaration parentModule , SubroutineDeclaration ParentSubroutine )
238
- {
239
- return new ParameterDeclaration (
240
- new QualifiedMemberName ( parentModule . QualifiedName . QualifiedModuleName , "Filenumber" ) ,
241
- ParentSubroutine ,
242
- "Integer" ,
243
- null ,
244
- null ,
245
- false ,
246
- false ) ;
247
- }
248
-
249
- private static SubroutineDeclaration InputBFunction ( Declaration parentModule )
250
- {
251
- var inputBFunction = InputBFunctionWithoutParameters ( parentModule ) ;
252
- inputBFunction . AddParameter ( NumberParameter ( parentModule , inputBFunction ) ) ;
253
- inputBFunction . AddParameter ( FileNumberParameter ( parentModule , inputBFunction ) ) ;
254
- return inputBFunction ;
255
- }
256
-
257
- private static SubroutineDeclaration InputBFunctionWithoutParameters ( Declaration parentModule )
258
- {
259
- return new SubroutineDeclaration (
260
- new QualifiedMemberName ( parentModule . QualifiedName . QualifiedModuleName , "InputB" ) ,
261
- parentModule ,
262
- parentModule ,
263
- "Variant" ,
264
- Accessibility . Public ,
265
- null ,
266
- Selection . Home ,
267
- true ,
268
- null ,
269
- new Attributes ( ) ) ;
270
- }
271
-
272
-
273
- private static FunctionDeclaration LBoundFunction ( Declaration parentModule )
274
- {
275
- var lboundFunction = LBoundFunctionWithoutParameters ( parentModule ) ;
276
- lboundFunction . AddParameter ( ArrayNameParameter ( parentModule , lboundFunction ) ) ;
277
- lboundFunction . AddParameter ( DimensionParameter ( parentModule , lboundFunction ) ) ;
278
- return lboundFunction ;
279
- }
280
-
281
- private static FunctionDeclaration LBoundFunctionWithoutParameters ( Declaration parentModule )
282
- {
283
- return new FunctionDeclaration (
284
- new QualifiedMemberName ( parentModule . QualifiedName . QualifiedModuleName , "LBound" ) ,
285
- parentModule ,
286
- parentModule ,
287
- "Long" ,
288
- null ,
289
- null ,
290
- Accessibility . Public ,
291
- null ,
292
- Selection . Home ,
293
- false ,
294
- true ,
295
- null ,
296
- new Attributes ( ) ) ;
297
- }
298
-
299
- private static ParameterDeclaration ArrayNameParameter ( Declaration parentModule , FunctionDeclaration parentFunction )
300
- {
301
- var arrayParam = new ParameterDeclaration ( new QualifiedMemberName ( parentModule . QualifiedName . QualifiedModuleName , "Arrayname" ) , parentFunction , "Variant" , null , null , false , false , true ) ;
302
- return arrayParam ;
303
- }
304
-
305
- private static ParameterDeclaration DimensionParameter ( Declaration parentModule , FunctionDeclaration parentFunction )
306
- {
307
- var rankParam = new ParameterDeclaration ( new QualifiedMemberName ( parentModule . QualifiedName . QualifiedModuleName , "Dimension" ) , parentFunction , "Long" , null , null , true , false ) ;
308
- return rankParam ;
309
- }
310
-
311
-
312
- private static FunctionDeclaration UBoundFunction ( Declaration parentModule )
313
- {
314
- var uboundFunction = UBoundFunctionWithoutParameters ( parentModule ) ;
315
- uboundFunction . AddParameter ( ArrayNameParameter ( parentModule , uboundFunction ) ) ;
316
- uboundFunction . AddParameter ( DimensionParameter ( parentModule , uboundFunction ) ) ;
317
- return uboundFunction ;
318
- }
319
-
320
- private static FunctionDeclaration UBoundFunctionWithoutParameters ( Declaration parentModule )
321
- {
322
- return new FunctionDeclaration (
323
- new QualifiedMemberName ( parentModule . QualifiedName . QualifiedModuleName , "UBound" ) ,
324
- parentModule ,
325
- parentModule ,
326
- "Long" ,
327
- null ,
328
- null ,
329
- Accessibility . Public ,
330
- null ,
331
- Selection . Home ,
332
- false ,
333
- true ,
334
- null ,
335
- new Attributes ( ) ) ;
336
- }
337
-
338
158
}
339
159
}
0 commit comments