@@ -385,11 +385,13 @@ public virtual bool IsArray()
385
385
var rParenMethod = Context . GetType ( ) . GetMethod ( "RPAREN" ) ;
386
386
if ( rParenMethod == null )
387
387
{
388
- return false ;
388
+ _isArray = false ;
389
+ return _isArray . Value ;
389
390
}
390
391
391
392
var declaration = ( dynamic ) Context ;
392
- return declaration . LPAREN ( ) != null && declaration . RPAREN ( ) != null ;
393
+ _isArray = declaration . LPAREN ( ) != null && declaration . RPAREN ( ) != null ;
394
+ return _isArray . Value ;
393
395
}
394
396
395
397
private bool ? _isTypeSpecified ;
@@ -425,15 +427,18 @@ public virtual bool IsTypeSpecified()
425
427
var method = Context . GetType ( ) . GetMethod ( "asTypeClause" ) ;
426
428
if ( method == null )
427
429
{
430
+ _isTypeSpecified = false ;
428
431
return false ;
429
432
}
430
433
431
434
if ( HasTypeHint ( ) )
432
435
{
436
+ _isTypeSpecified = false ;
433
437
return true ;
434
438
}
435
439
436
- return ( ( dynamic ) Context ) . asTypeClause ( ) is VBAParser . AsTypeClauseContext ;
440
+ _isTypeSpecified = ( ( dynamic ) Context ) . asTypeClause ( ) is VBAParser . AsTypeClauseContext ;
441
+ return _isTypeSpecified . Value ;
437
442
}
438
443
439
444
private bool ? _hasTypeHint ;
@@ -471,19 +476,22 @@ public bool HasTypeHint(out string token)
471
476
if ( Context == null || _neverHinted . Any ( item => DeclarationType . HasFlag ( item ) ) )
472
477
{
473
478
token = null ;
474
- return false ;
479
+ _hasTypeHint = false ;
480
+ return _hasTypeHint . Value ;
475
481
}
476
482
477
483
try
478
484
{
479
485
var hint = ( ( dynamic ) Context ) . typeHint ( ) ;
480
486
token = hint == null ? null : hint . GetText ( ) ;
481
- return hint != null ;
487
+ _hasTypeHint = hint != null ;
488
+ return _hasTypeHint . Value ;
482
489
}
483
490
catch ( RuntimeBinderException )
484
491
{
485
492
token = null ;
486
- return false ;
493
+ _hasTypeHint = false ;
494
+ return _hasTypeHint . Value ;
487
495
}
488
496
}
489
497
0 commit comments