示例#1
0
        public static ITokenNode GetNameToken([CanBeNull] this ILongIdentifier longIdentifier)
        {
            if (longIdentifier == null)
            {
                return(null);
            }

            var ids = longIdentifier.Identifiers;

            return(ids.IsEmpty ? null : ids.Last());
        }
示例#2
0
        public static TreeTextRange GetNameRange([CanBeNull] this ILongIdentifier longIdentifier)
        {
            if (longIdentifier == null)
            {
                return(TreeTextRange.InvalidRange);
            }

            var ids = longIdentifier.Identifiers;

            return(ids.IsEmpty ? TreeTextRange.InvalidRange : ids.Last().GetTreeTextRange());
        }
示例#3
0
        public static TreeTextRange GetNameRange([CanBeNull] this ILongIdentifier longIdentifier)
        {
            if (longIdentifier == null)
            {
                return(TreeTextRange.InvalidRange);
            }

            // ReSharper disable once TreeNodeEnumerableCanBeUsedTag
            var ids = longIdentifier.Identifiers;

            return(ids.IsEmpty ? TreeTextRange.InvalidRange : ids.Last().GetTreeTextRange());
        }