public static ITokenNode GetNameToken([CanBeNull] this ILongIdentifier longIdentifier) { if (longIdentifier == null) { return(null); } var ids = longIdentifier.Identifiers; return(ids.IsEmpty ? null : ids.Last()); }
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()); }
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()); }