@@ -262,8 +262,16 @@ private List<Declaration> GetBuiltInDeclarations()
262
262
new List < IAnnotation > ( ) ,
263
263
new Attributes ( ) ) ;
264
264
265
+ var dateTimeModule = new ProceduralModuleDeclaration (
266
+ new QualifiedMemberName ( new QualifiedModuleName ( "VBA" , "C:\\ Program Files\\ Common Files\\ Microsoft Shared\\ VBA\\ VBA7.1\\ VBE7.DLL" , "DateTime" ) , "DateTime" ) ,
267
+ vbaDeclaration ,
268
+ "Strings" ,
269
+ true ,
270
+ new List < IAnnotation > ( ) ,
271
+ new Attributes ( ) ) ;
272
+
265
273
var commandFunction = new FunctionDeclaration (
266
- new QualifiedMemberName ( new QualifiedModuleName ( "VBA" , "C: \\ Program Files \\ Common Files \\ Microsoft Shared \\ VBA \\ VBA7.1 \\ VBE7.DLL" , "Interaction" ) , "_B_var_Command" ) ,
274
+ new QualifiedMemberName ( interactionModule . QualifiedName . QualifiedModuleName , "_B_var_Command" ) ,
267
275
interactionModule ,
268
276
interactionModule ,
269
277
"Variant" ,
@@ -278,7 +286,7 @@ private List<Declaration> GetBuiltInDeclarations()
278
286
new Attributes ( ) ) ;
279
287
280
288
var environFunction = new FunctionDeclaration (
281
- new QualifiedMemberName ( new QualifiedModuleName ( "VBA" , "C: \\ Program Files \\ Common Files \\ Microsoft Shared \\ VBA \\ VBA7.1 \\ VBE7.DLL" , "Interaction" ) , "_B_var_Environ" ) ,
289
+ new QualifiedMemberName ( interactionModule . QualifiedName . QualifiedModuleName , "_B_var_Environ" ) ,
282
290
interactionModule ,
283
291
interactionModule ,
284
292
"Variant" ,
@@ -293,7 +301,7 @@ private List<Declaration> GetBuiltInDeclarations()
293
301
new Attributes ( ) ) ;
294
302
295
303
var rtrimFunction = new FunctionDeclaration (
296
- new QualifiedMemberName ( new QualifiedModuleName ( "VBA" , "C: \\ Program Files \\ Common Files \\ Microsoft Shared \\ VBA \\ VBA7.1 \\ VBE7.DLL" , "Strings" ) , "_B_var_RTrim" ) ,
304
+ new QualifiedMemberName ( stringsModule . QualifiedName . QualifiedModuleName , "_B_var_RTrim" ) ,
297
305
stringsModule ,
298
306
stringsModule ,
299
307
"Variant" ,
@@ -308,7 +316,7 @@ private List<Declaration> GetBuiltInDeclarations()
308
316
new Attributes ( ) ) ;
309
317
310
318
var chrFunction = new FunctionDeclaration (
311
- new QualifiedMemberName ( new QualifiedModuleName ( "VBA" , "C: \\ Program Files \\ Common Files \\ Microsoft Shared \\ VBA \\ VBA7.1 \\ VBE7.DLL" , "Strings" ) , "_B_var_Chr" ) ,
319
+ new QualifiedMemberName ( stringsModule . QualifiedName . QualifiedModuleName , "_B_var_Chr" ) ,
312
320
stringsModule ,
313
321
stringsModule ,
314
322
"Variant" ,
@@ -323,7 +331,7 @@ private List<Declaration> GetBuiltInDeclarations()
323
331
new Attributes ( ) ) ;
324
332
325
333
var formatFunction = new FunctionDeclaration (
326
- new QualifiedMemberName ( new QualifiedModuleName ( "VBA" , "C: \\ Program Files \\ Common Files \\ Microsoft Shared \\ VBA \\ VBA7.1 \\ VBE7.DLL" , "Strings" ) , "_B_var_Format" ) ,
334
+ new QualifiedMemberName ( stringsModule . QualifiedName . QualifiedModuleName , "_B_var_Format" ) ,
327
335
stringsModule ,
328
336
stringsModule ,
329
337
"Variant" ,
@@ -338,7 +346,7 @@ private List<Declaration> GetBuiltInDeclarations()
338
346
new Attributes ( ) ) ;
339
347
340
348
var firstFormatParam = new ParameterDeclaration (
341
- new QualifiedMemberName ( new QualifiedModuleName ( "VBA" , "C: \\ Program Files \\ Common Files \\ Microsoft Shared \\ VBA \\ VBA7.1 \\ VBE7.DLL" , "Strings" ) , "Expression" ) ,
349
+ new QualifiedMemberName ( stringsModule . QualifiedName . QualifiedModuleName , "Expression" ) ,
342
350
formatFunction ,
343
351
"Variant" ,
344
352
null ,
@@ -347,7 +355,7 @@ private List<Declaration> GetBuiltInDeclarations()
347
355
true ) ;
348
356
349
357
var secondFormatParam = new ParameterDeclaration (
350
- new QualifiedMemberName ( new QualifiedModuleName ( "VBA" , "C: \\ Program Files \\ Common Files \\ Microsoft Shared \\ VBA \\ VBA7.1 \\ VBE7.DLL" , "Strings" ) , "Format" ) ,
358
+ new QualifiedMemberName ( stringsModule . QualifiedName . QualifiedModuleName , "Format" ) ,
351
359
formatFunction ,
352
360
"Variant" ,
353
361
null ,
@@ -356,7 +364,7 @@ private List<Declaration> GetBuiltInDeclarations()
356
364
true ) ;
357
365
358
366
var thirdFormatParam = new ParameterDeclaration (
359
- new QualifiedMemberName ( new QualifiedModuleName ( "VBA" , "C: \\ Program Files \\ Common Files \\ Microsoft Shared \\ VBA \\ VBA7.1 \\ VBE7.DLL" , "Strings" ) , "FirstDayOfWeek" ) ,
367
+ new QualifiedMemberName ( stringsModule . QualifiedName . QualifiedModuleName , "FirstDayOfWeek" ) ,
360
368
formatFunction ,
361
369
"VbDayOfWeek" ,
362
370
null ,
@@ -369,7 +377,7 @@ private List<Declaration> GetBuiltInDeclarations()
369
377
formatFunction . AddParameter ( thirdFormatParam ) ;
370
378
371
379
var rightFunction = new FunctionDeclaration (
372
- new QualifiedMemberName ( new QualifiedModuleName ( "VBA" , "C: \\ Program Files \\ Common Files \\ Microsoft Shared \\ VBA \\ VBA7.1 \\ VBE7.DLL" , "Strings" ) , "_B_var_Right" ) ,
380
+ new QualifiedMemberName ( stringsModule . QualifiedName . QualifiedModuleName , "_B_var_Right" ) ,
373
381
stringsModule ,
374
382
stringsModule ,
375
383
"Variant" ,
@@ -384,7 +392,7 @@ private List<Declaration> GetBuiltInDeclarations()
384
392
new Attributes ( ) ) ;
385
393
386
394
var firstRightParam = new ParameterDeclaration (
387
- new QualifiedMemberName ( new QualifiedModuleName ( "VBA" , "C: \\ Program Files \\ Common Files \\ Microsoft Shared \\ VBA \\ VBA7.1 \\ VBE7.DLL" , "Strings" ) , "String" ) ,
395
+ new QualifiedMemberName ( stringsModule . QualifiedName . QualifiedModuleName , "String" ) ,
388
396
rightFunction ,
389
397
"Variant" ,
390
398
null ,
@@ -395,7 +403,7 @@ private List<Declaration> GetBuiltInDeclarations()
395
403
rightFunction . AddParameter ( firstRightParam ) ;
396
404
397
405
var lcaseFunction = new FunctionDeclaration (
398
- new QualifiedMemberName ( new QualifiedModuleName ( "VBA" , "C: \\ Program Files \\ Common Files \\ Microsoft Shared \\ VBA \\ VBA7.1 \\ VBE7.DLL" , "Strings" ) , "_B_var_LCase" ) ,
406
+ new QualifiedMemberName ( stringsModule . QualifiedName . QualifiedModuleName , "_B_var_LCase" ) ,
399
407
stringsModule ,
400
408
stringsModule ,
401
409
"Variant" ,
@@ -410,7 +418,7 @@ private List<Declaration> GetBuiltInDeclarations()
410
418
new Attributes ( ) ) ;
411
419
412
420
var leftbFunction = new FunctionDeclaration (
413
- new QualifiedMemberName ( new QualifiedModuleName ( "VBA" , "C: \\ Program Files \\ Common Files \\ Microsoft Shared \\ VBA \\ VBA7.1 \\ VBE7.DLL" , "Strings" ) , "_B_var_LeftB" ) ,
421
+ new QualifiedMemberName ( stringsModule . QualifiedName . QualifiedModuleName , "_B_var_LeftB" ) ,
414
422
stringsModule ,
415
423
stringsModule ,
416
424
"Variant" ,
@@ -425,7 +433,7 @@ private List<Declaration> GetBuiltInDeclarations()
425
433
new Attributes ( ) ) ;
426
434
427
435
var firstLeftBParam = new ParameterDeclaration (
428
- new QualifiedMemberName ( new QualifiedModuleName ( "VBA" , "C: \\ Program Files \\ Common Files \\ Microsoft Shared \\ VBA \\ VBA7.1 \\ VBE7.DLL" , "Strings" ) , "String" ) ,
436
+ new QualifiedMemberName ( stringsModule . QualifiedName . QualifiedModuleName , "String" ) ,
429
437
leftbFunction ,
430
438
"Variant" ,
431
439
null ,
@@ -436,7 +444,7 @@ private List<Declaration> GetBuiltInDeclarations()
436
444
leftbFunction . AddParameter ( firstLeftBParam ) ;
437
445
438
446
var chrwFunction = new FunctionDeclaration (
439
- new QualifiedMemberName ( new QualifiedModuleName ( "VBA" , "C: \\ Program Files \\ Common Files \\ Microsoft Shared \\ VBA \\ VBA7.1 \\ VBE7.DLL" , "Strings" ) , "_B_var_ChrW" ) ,
447
+ new QualifiedMemberName ( stringsModule . QualifiedName . QualifiedModuleName , "_B_var_ChrW" ) ,
440
448
stringsModule ,
441
449
stringsModule ,
442
450
"Variant" ,
@@ -451,7 +459,7 @@ private List<Declaration> GetBuiltInDeclarations()
451
459
new Attributes ( ) ) ;
452
460
453
461
var leftFunction = new FunctionDeclaration (
454
- new QualifiedMemberName ( new QualifiedModuleName ( "VBA" , "C: \\ Program Files \\ Common Files \\ Microsoft Shared \\ VBA \\ VBA7.1 \\ VBE7.DLL" , "Strings" ) , "_B_var_Left" ) ,
462
+ new QualifiedMemberName ( stringsModule . QualifiedName . QualifiedModuleName , "_B_var_Left" ) ,
455
463
stringsModule ,
456
464
stringsModule ,
457
465
"Variant" ,
@@ -466,7 +474,7 @@ private List<Declaration> GetBuiltInDeclarations()
466
474
new Attributes ( ) ) ;
467
475
468
476
var firstLeftParam = new ParameterDeclaration (
469
- new QualifiedMemberName ( new QualifiedModuleName ( "VBA" , "C: \\ Program Files \\ Common Files \\ Microsoft Shared \\ VBA \\ VBA7.1 \\ VBE7.DLL" , "Strings" ) , "String" ) ,
477
+ new QualifiedMemberName ( stringsModule . QualifiedName . QualifiedModuleName , "String" ) ,
470
478
leftFunction ,
471
479
"Variant" ,
472
480
null ,
@@ -477,7 +485,7 @@ private List<Declaration> GetBuiltInDeclarations()
477
485
leftFunction . AddParameter ( firstLeftParam ) ;
478
486
479
487
var rightbFunction = new FunctionDeclaration (
480
- new QualifiedMemberName ( new QualifiedModuleName ( "VBA" , "C: \\ Program Files \\ Common Files \\ Microsoft Shared \\ VBA \\ VBA7.1 \\ VBE7.DLL" , "Strings" ) , "_B_var_RightB" ) ,
488
+ new QualifiedMemberName ( stringsModule . QualifiedName . QualifiedModuleName , "_B_var_RightB" ) ,
481
489
stringsModule ,
482
490
stringsModule ,
483
491
"Variant" ,
@@ -492,7 +500,7 @@ private List<Declaration> GetBuiltInDeclarations()
492
500
new Attributes ( ) ) ;
493
501
494
502
var firstRightBParam = new ParameterDeclaration (
495
- new QualifiedMemberName ( new QualifiedModuleName ( "VBA" , "C: \\ Program Files \\ Common Files \\ Microsoft Shared \\ VBA \\ VBA7.1 \\ VBE7.DLL" , "Strings" ) , "String" ) ,
503
+ new QualifiedMemberName ( stringsModule . QualifiedName . QualifiedModuleName , "String" ) ,
496
504
rightbFunction ,
497
505
"Variant" ,
498
506
null ,
@@ -503,7 +511,7 @@ private List<Declaration> GetBuiltInDeclarations()
503
511
rightbFunction . AddParameter ( firstRightBParam ) ;
504
512
505
513
var midbFunction = new FunctionDeclaration (
506
- new QualifiedMemberName ( new QualifiedModuleName ( "VBA" , "C: \\ Program Files \\ Common Files \\ Microsoft Shared \\ VBA \\ VBA7.1 \\ VBE7.DLL" , "Strings" ) , "_B_var_MidB" ) ,
514
+ new QualifiedMemberName ( stringsModule . QualifiedName . QualifiedModuleName , "_B_var_MidB" ) ,
507
515
stringsModule ,
508
516
stringsModule ,
509
517
"Variant" ,
@@ -518,7 +526,7 @@ private List<Declaration> GetBuiltInDeclarations()
518
526
new Attributes ( ) ) ;
519
527
520
528
var firstMidBParam = new ParameterDeclaration (
521
- new QualifiedMemberName ( new QualifiedModuleName ( "VBA" , "C: \\ Program Files \\ Common Files \\ Microsoft Shared \\ VBA \\ VBA7.1 \\ VBE7.DLL" , "Strings" ) , "String" ) ,
529
+ new QualifiedMemberName ( stringsModule . QualifiedName . QualifiedModuleName , "String" ) ,
522
530
midbFunction ,
523
531
"Variant" ,
524
532
null ,
@@ -527,7 +535,7 @@ private List<Declaration> GetBuiltInDeclarations()
527
535
true ) ;
528
536
529
537
var secondMidBParam = new ParameterDeclaration (
530
- new QualifiedMemberName ( new QualifiedModuleName ( "VBA" , "C: \\ Program Files \\ Common Files \\ Microsoft Shared \\ VBA \\ VBA7.1 \\ VBE7.DLL" , "Strings" ) , "Start" ) ,
538
+ new QualifiedMemberName ( stringsModule . QualifiedName . QualifiedModuleName , "Start" ) ,
531
539
midbFunction ,
532
540
"Long" ,
533
541
null ,
@@ -539,7 +547,7 @@ private List<Declaration> GetBuiltInDeclarations()
539
547
midbFunction . AddParameter ( secondMidBParam ) ;
540
548
541
549
var ucaseFunction = new FunctionDeclaration (
542
- new QualifiedMemberName ( new QualifiedModuleName ( "VBA" , "C: \\ Program Files \\ Common Files \\ Microsoft Shared \\ VBA \\ VBA7.1 \\ VBE7.DLL" , "Strings" ) , "_B_var_UCase" ) ,
550
+ new QualifiedMemberName ( stringsModule . QualifiedName . QualifiedModuleName , "_B_var_UCase" ) ,
543
551
stringsModule ,
544
552
stringsModule ,
545
553
"Variant" ,
@@ -554,7 +562,7 @@ private List<Declaration> GetBuiltInDeclarations()
554
562
new Attributes ( ) ) ;
555
563
556
564
var trimFunction = new FunctionDeclaration (
557
- new QualifiedMemberName ( new QualifiedModuleName ( "VBA" , "C: \\ Program Files \\ Common Files \\ Microsoft Shared \\ VBA \\ VBA7.1 \\ VBE7.DLL" , "Strings" ) , "_B_var_Trim" ) ,
565
+ new QualifiedMemberName ( stringsModule . QualifiedName . QualifiedModuleName , "_B_var_Trim" ) ,
558
566
stringsModule ,
559
567
stringsModule ,
560
568
"Variant" ,
@@ -569,7 +577,7 @@ private List<Declaration> GetBuiltInDeclarations()
569
577
new Attributes ( ) ) ;
570
578
571
579
var ltrimFunction = new FunctionDeclaration (
572
- new QualifiedMemberName ( new QualifiedModuleName ( "VBA" , "C: \\ Program Files \\ Common Files \\ Microsoft Shared \\ VBA \\ VBA7.1 \\ VBE7.DLL" , "Strings" ) , "_B_var_LTrim" ) ,
580
+ new QualifiedMemberName ( stringsModule . QualifiedName . QualifiedModuleName , "_B_var_LTrim" ) ,
573
581
stringsModule ,
574
582
stringsModule ,
575
583
"Variant" ,
@@ -584,7 +592,7 @@ private List<Declaration> GetBuiltInDeclarations()
584
592
new Attributes ( ) ) ;
585
593
586
594
var midFunction = new FunctionDeclaration (
587
- new QualifiedMemberName ( new QualifiedModuleName ( "VBA" , "C: \\ Program Files \\ Common Files \\ Microsoft Shared \\ VBA \\ VBA7.1 \\ VBE7.DLL" , "Strings" ) , "_B_var_Mid" ) ,
595
+ new QualifiedMemberName ( stringsModule . QualifiedName . QualifiedModuleName , "_B_var_Mid" ) ,
588
596
stringsModule ,
589
597
stringsModule ,
590
598
"Variant" ,
@@ -599,7 +607,7 @@ private List<Declaration> GetBuiltInDeclarations()
599
607
new Attributes ( ) ) ;
600
608
601
609
var firstMidParam = new ParameterDeclaration (
602
- new QualifiedMemberName ( new QualifiedModuleName ( "VBA" , "C: \\ Program Files \\ Common Files \\ Microsoft Shared \\ VBA \\ VBA7.1 \\ VBE7.DLL" , "Strings" ) , "String" ) ,
610
+ new QualifiedMemberName ( stringsModule . QualifiedName . QualifiedModuleName , "String" ) ,
603
611
midbFunction ,
604
612
"Variant" ,
605
613
null ,
@@ -608,7 +616,7 @@ private List<Declaration> GetBuiltInDeclarations()
608
616
true ) ;
609
617
610
618
var secondMidParam = new ParameterDeclaration (
611
- new QualifiedMemberName ( new QualifiedModuleName ( "VBA" , "C: \\ Program Files \\ Common Files \\ Microsoft Shared \\ VBA \\ VBA7.1 \\ VBE7.DLL" , "Strings" ) , "Start" ) ,
619
+ new QualifiedMemberName ( stringsModule . QualifiedName . QualifiedModuleName , "Start" ) ,
612
620
midbFunction ,
613
621
"Long" ,
614
622
null ,
@@ -620,7 +628,7 @@ private List<Declaration> GetBuiltInDeclarations()
620
628
midFunction . AddParameter ( secondMidParam ) ;
621
629
622
630
var hexFunction = new FunctionDeclaration (
623
- new QualifiedMemberName ( new QualifiedModuleName ( "VBA" , "C: \\ Program Files \\ Common Files \\ Microsoft Shared \\ VBA \\ VBA7.1 \\ VBE7.DLL" , "Strings" ) , "_B_var_Hex" ) ,
631
+ new QualifiedMemberName ( conversionModule . QualifiedName . QualifiedModuleName , "_B_var_Hex" ) ,
624
632
conversionModule ,
625
633
conversionModule ,
626
634
"Variant" ,
@@ -635,7 +643,7 @@ private List<Declaration> GetBuiltInDeclarations()
635
643
new Attributes ( ) ) ;
636
644
637
645
var octFunction = new FunctionDeclaration (
638
- new QualifiedMemberName ( new QualifiedModuleName ( "VBA" , "C: \\ Program Files \\ Common Files \\ Microsoft Shared \\ VBA \\ VBA7.1 \\ VBE7.DLL" , "Strings" ) , "_B_var_Oct" ) ,
646
+ new QualifiedMemberName ( conversionModule . QualifiedName . QualifiedModuleName , "_B_var_Oct" ) ,
639
647
conversionModule ,
640
648
conversionModule ,
641
649
"Variant" ,
@@ -650,7 +658,7 @@ private List<Declaration> GetBuiltInDeclarations()
650
658
new Attributes ( ) ) ;
651
659
652
660
var errorFunction = new FunctionDeclaration (
653
- new QualifiedMemberName ( new QualifiedModuleName ( "VBA" , "C: \\ Program Files \\ Common Files \\ Microsoft Shared \\ VBA \\ VBA7.1 \\ VBE7.DLL" , "Strings" ) , "_B_var_Error" ) ,
661
+ new QualifiedMemberName ( conversionModule . QualifiedName . QualifiedModuleName , "_B_var_Error" ) ,
654
662
conversionModule ,
655
663
conversionModule ,
656
664
"Variant" ,
@@ -665,7 +673,7 @@ private List<Declaration> GetBuiltInDeclarations()
665
673
new Attributes ( ) ) ;
666
674
667
675
var strFunction = new FunctionDeclaration (
668
- new QualifiedMemberName ( new QualifiedModuleName ( "VBA" , "C: \\ Program Files \\ Common Files \\ Microsoft Shared \\ VBA \\ VBA7.1 \\ VBE7.DLL" , "Strings" ) , "_B_var_Str" ) ,
676
+ new QualifiedMemberName ( conversionModule . QualifiedName . QualifiedModuleName , "_B_var_Str" ) ,
669
677
conversionModule ,
670
678
conversionModule ,
671
679
"Variant" ,
@@ -680,7 +688,7 @@ private List<Declaration> GetBuiltInDeclarations()
680
688
new Attributes ( ) ) ;
681
689
682
690
var curDirFunction = new FunctionDeclaration (
683
- new QualifiedMemberName ( new QualifiedModuleName ( "VBA" , "C: \\ Program Files \\ Common Files \\ Microsoft Shared \\ VBA \\ VBA7.1 \\ VBE7.DLL" , "Strings" ) , "_B_var_CurDir" ) ,
691
+ new QualifiedMemberName ( fileSystemModule . QualifiedName . QualifiedModuleName , "_B_var_CurDir" ) ,
684
692
fileSystemModule ,
685
693
fileSystemModule ,
686
694
"Variant" ,
@@ -694,13 +702,45 @@ private List<Declaration> GetBuiltInDeclarations()
694
702
new List < IAnnotation > ( ) ,
695
703
new Attributes ( ) ) ;
696
704
705
+ var datePropertyGet = new PropertyGetDeclaration (
706
+ new QualifiedMemberName ( dateTimeModule . QualifiedName . QualifiedModuleName , "Date" ) ,
707
+ dateTimeModule ,
708
+ dateTimeModule ,
709
+ "Variant" ,
710
+ null ,
711
+ string . Empty ,
712
+ Accessibility . Global ,
713
+ null ,
714
+ new Selection ( ) ,
715
+ false ,
716
+ true ,
717
+ new List < IAnnotation > ( ) ,
718
+ new Attributes ( ) ) ;
719
+
720
+
721
+ var timePropertyGet = new PropertyGetDeclaration (
722
+ new QualifiedMemberName ( dateTimeModule . QualifiedName . QualifiedModuleName , "Time" ) ,
723
+ dateTimeModule ,
724
+ dateTimeModule ,
725
+ "Variant" ,
726
+ null ,
727
+ string . Empty ,
728
+ Accessibility . Global ,
729
+ null ,
730
+ new Selection ( ) ,
731
+ false ,
732
+ true ,
733
+ new List < IAnnotation > ( ) ,
734
+ new Attributes ( ) ) ;
735
+
697
736
return new List < Declaration >
698
737
{
699
738
vbaDeclaration ,
700
739
conversionModule ,
701
740
fileSystemModule ,
702
741
interactionModule ,
703
742
stringsModule ,
743
+ dateTimeModule ,
704
744
commandFunction ,
705
745
environFunction ,
706
746
rtrimFunction ,
@@ -732,7 +772,9 @@ private List<Declaration> GetBuiltInDeclarations()
732
772
octFunction ,
733
773
errorFunction ,
734
774
strFunction ,
735
- curDirFunction
775
+ curDirFunction ,
776
+ datePropertyGet ,
777
+ timePropertyGet
736
778
} ;
737
779
}
738
780
}
0 commit comments