예제 #1
0
        private static bool IsColon(TrackingTokenInfo token, ITextSnapshot snapshot)
        {
            if (token.Category != TokenCategory.Delimiter)
            {
                return(false);
            }
            var span = token.ToSnapshotSpan(snapshot);

            return(span.Length == 1 && span.GetText() == ":");
        }
예제 #2
0
        private static bool IsCloseGrouping(TrackingTokenInfo token, ITextSnapshot snapshot)
        {
            if (token.Category != TokenCategory.Grouping)
            {
                return(false);
            }
            var span = token.ToSnapshotSpan(snapshot);

            return(span.Length == 1 && ")]}".Contains(span.GetText()));
        }