public override void EnterPropertySetStmt(VBAParser.PropertySetStmtContext context)
        {
            var accessibility = GetProcedureAccessibility(context.visibility());
            var identifier    = context.subroutineName();

            if (identifier == null)
            {
                return;
            }
            var name = Identifier.GetName(identifier.identifier());

            var declaration = CreateDeclaration(
                name,
                null,
                accessibility,
                DeclarationType.PropertySet,
                context,
                context.subroutineName().GetSelection(),
                false,
                null,
                null);

            AddDeclaration(declaration);
            SetCurrentScope(declaration, name);
        }
Example #2
0
 public override void ExitPropertySetStmt(VBAParser.PropertySetStmtContext context)
 {
     if (!string.IsNullOrEmpty(_currentScope.Item1) && _currentScopeAttributes.Any())
     {
         _attributes.Add(_currentScope, _currentScopeAttributes);
     }
 }
Example #3
0
 public ProcedureNode(VBAParser.PropertySetStmtContext context, string scope, string localScope)
     : this(context, scope, localScope, VBProcedureKind.PropertySet, context.visibility(), context.ambiguousIdentifier(), null)
 {
     _argsListContext = context.argList();
     _staticNode      = context.STATIC();
     _keyword         = context.PROPERTY_SET();
 }
Example #4
0
 public override void ExitPropertySetStmt(VBAParser.PropertySetStmtContext context)
 {
     if (_currentScopeAttributes.Any())
     {
         _attributes.Add(_currentScope, _currentScopeAttributes);
     }
 }
Example #5
0
        public override void EnterPropertySetStmt(VBAParser.PropertySetStmtContext context)
        {
            var accessibility = GetProcedureAccessibility(context.visibility());
            var name          = context.ambiguousIdentifier().GetText();

            _declarations.Add(CreateDeclaration(name, null, accessibility, DeclarationType.PropertySet, context, context.ambiguousIdentifier().GetSelection()));
            SetCurrentScope(name);
        }
        public static string Signature(this VBAParser.PropertySetStmtContext context)
        {
            var visibility     = context.visibility();
            var visibilityText = visibility == null ? string.Empty : visibility.GetText();

            var identifierText = context.ambiguousIdentifier().GetText();
            var argsText       = context.argList().GetText();

            return((visibilityText + ' ' + Tokens.Property + ' ' + Tokens.Set + ' ' + identifierText + argsText).Trim());
        }
 public override void ExitPropertySetStmt(VBAParser.PropertySetStmtContext context)
 {
     SetCurrentScope();
 }
Example #8
0
 public override void EnterPropertySetStmt(VBAParser.PropertySetStmtContext context)
 {
     SetCurrentScope(context.identifier().GetText(), DeclarationType.PropertySet);
 }
Example #9
0
        public static string GetName(VBAParser.PropertySetStmtContext context, out Interval tokenInterval)
        {
            var nameContext = context.subroutineName();

            return(GetName(nameContext, out tokenInterval));
        }
Example #10
0
 public override void EnterPropertySetStmt(VBAParser.PropertySetStmtContext context)
 {
     _currentScopeAttributes = new Attributes();
     _currentScope           = Tuple.Create(context.identifier().GetText(), DeclarationType.PropertySet);
 }
Example #11
0
 public override void EnterPropertySetStmt(VBAParser.PropertySetStmtContext context)
 {
     _currentScopeAttributes = new Attributes();
     _currentScope           = Tuple.Create(Identifier.GetName(context.subroutineName()), DeclarationType.PropertySet);
 }
 public static Selection GetProcedureSelection(this VBAParser.PropertySetStmtContext context)
 {
     return(GetProcedureContextSelection(context));
 }
Example #13
0
 public override void EnterPropertySetStmt(VBAParser.PropertySetStmtContext context)
 {
     CheckContext(context, context.PROPERTY_SET());
     CheckContext(context, context.END_PROPERTY());
     base.EnterPropertySetStmt(context);
 }
Example #14
0
 public override void ExitPropertySetStmt([NotNull] VBAParser.PropertySetStmtContext context)
 {
     ExitMeasurableMember();
 }
Example #15
0
 public override void EnterPropertySetStmt([NotNull] VBAParser.PropertySetStmtContext context)
 {
     _results.Add(new CodeMetricsResult(0, 1, 0));
     _currentMember = _finder.UserDeclarations(DeclarationType.PropertySet).Where(d => d.Context == context).First();
 }
 public override void EnterPropertySetStmt(VBAParser.PropertySetStmtContext context)
 {
     SetCurrentScope(Identifier.GetName(context.subroutineName()));
 }
Example #17
0
 public override void ExitPropertySetStmt([NotNull] VBAParser.PropertySetStmtContext context)
 => ExitMeasurableMember(_finder.UserDeclarations(DeclarationType.PropertySet).Where(d => d.Context == context).First());
Example #18
0
 public override void EnterPropertySetStmt(VBAParser.PropertySetStmtContext context)
 {
     _currentMember = new QualifiedMemberName(_qualifiedName, context.ambiguousIdentifier().GetText());
 }