Esempio n. 1
0
        public override void VisitIdentifierDeclarationName(IdentifierDeclarationNameSyntax node)
        {
            var symbol = _semanticModel.GetSymbol(node);

            if (symbol != null)
            {
                CreateTag(node.Name, GetClassificationType(symbol));
            }

            base.VisitIdentifierDeclarationName(node);
        }
Esempio n. 2
0
        public static string GetFullDeclarationName(this IdentifierDeclarationNameSyntax identifierDeclarationName)
        {
            var result = identifierDeclarationName.Name.Text;

            var parent = identifierDeclarationName.Parent;

            if (parent.Kind == SyntaxKind.QualifiedDeclarationName)
            {
                var qualifiedDeclarationName = (QualifiedDeclarationNameSyntax)parent;
                result = qualifiedDeclarationName.Left.ToStringIgnoringMacroReferences() + "::" + result;
            }

            return(result);
        }
Esempio n. 3
0
        private DeclarationNameSyntax ParseDeclarationName(bool declarationOnly)
        {
            var name = Match(SyntaxKind.IdentifierToken);

            var result = new IdentifierDeclarationNameSyntax(name) as DeclarationNameSyntax;

            if (!declarationOnly)
            {
                while (Current.Kind == SyntaxKind.ColonColonToken)
                {
                    var colonColon = Match(SyntaxKind.ColonColonToken);
                    var right      = new IdentifierDeclarationNameSyntax(Match(SyntaxKind.IdentifierToken));

                    result = new QualifiedDeclarationNameSyntax(result, colonColon, right);
                }
            }

            return(result);
        }
        private DeclarationNameSyntax ParseDeclarationName(bool declarationOnly)
        {
            var name = Match(SyntaxKind.IdentifierToken);

            var result = new IdentifierDeclarationNameSyntax(name) as DeclarationNameSyntax;

            if (!declarationOnly)
            {
                while (Current.Kind == SyntaxKind.ColonColonToken)
                {
                    var colonColon = Match(SyntaxKind.ColonColonToken);
                    var right = new IdentifierDeclarationNameSyntax(Match(SyntaxKind.IdentifierToken));

                    result = new QualifiedDeclarationNameSyntax(result, colonColon, right);
                }
            }

            return result;
        }
Esempio n. 5
0
 public QualifiedDeclarationNameSyntax(DeclarationNameSyntax left, SyntaxToken colonColonToken, IdentifierDeclarationNameSyntax right)
     : base(SyntaxKind.QualifiedDeclarationName)
 {
     RegisterChildNode(out Left, left);
     RegisterChildNode(out ColonColonToken, colonColonToken);
     RegisterChildNode(out Right, right);
 }
Esempio n. 6
0
 public Symbol GetSymbol(IdentifierDeclarationNameSyntax syntax)
 {
     var result = _bindingResult.GetBoundNode(syntax) as BoundName;
     return result?.Symbol;
 }
Esempio n. 7
0
 public virtual void VisitIdentifierDeclarationName(IdentifierDeclarationNameSyntax node)
 {
     DefaultVisit(node);
 }
Esempio n. 8
0
 public virtual void VisitIdentifierDeclarationName(IdentifierDeclarationNameSyntax node)
 {
     DefaultVisit(node);
 }
Esempio n. 9
0
        public Symbol GetSymbol(IdentifierDeclarationNameSyntax syntax)
        {
            var result = _bindingResult.GetBoundNode(syntax) as BoundName;

            return(result?.Symbol);
        }
Esempio n. 10
0
        public override void VisitIdentifierDeclarationName(IdentifierDeclarationNameSyntax node)
        {
            var symbol = _semanticModel.GetSymbol(node);
            if (symbol != null)
                CreateTag(node.Name, GetClassificationType(symbol));

            base.VisitIdentifierDeclarationName(node);
        }