Home | History | Annotate | Download | only in compile

Lines Matching refs:Span

32 // The struct that represents both Span objects and UntranslatableSections.
34 // Only present for Span objects. If not present, this was an UntranslatableSection.
37 // The UTF-16 index into the string where this span starts.
40 // The UTF-16 index into the string where this span ends, inclusive.
55 inline static UnifiedSpan SpanToUnifiedSpan(const StringPool::Span& span) {
56 return UnifiedSpan{*span.name, span.first_char, span.last_char};
64 // Merges the Span and UntranslatableSections of this StyledString into a single vector of
118 // pseudolocalized, while keeping the span indices synchronized.
121 // All Span indices are UTF-16 based, according to the resources.arsc format expected by the
131 // The stack that keeps track of what nested Span we're in.
145 UnifiedSpan* span = span_idx >= merged_spans.size() ? nullptr : &merged_spans[span_idx];
148 if (span != nullptr) {
149 if (parent_span == nullptr || parent_span->last_char > span->first_char) {
150 // There is no parent, or this span is the child of the parent.
151 // Pseudolocalize all the text until this span.
152 const StringPiece16 substr = text.substr(cursor, span->first_char - cursor);
165 span->first_char = new_cursor;
166 if (!span->tag) {
177 // There is a parent, and either this span is not a child of it, or there are no more spans.
208 for (UnifiedSpan& span : merged_spans) {
209 if (span.tag) {
210 localized.spans.push_back(Span{std::move(span.tag.value()), span.first_char, span.last_char});