| 165 | CurCharSpan.Len += 1; |
| 166 | } |
| 167 | void AddToken() { |
| 168 | Y_ASSERT(CurCharSpan.Len); |
| 169 | Y_ASSERT(CurCharSpan.Type == TOKEN_WORD || CurCharSpan.Type == TOKEN_NUMBER); |
| 170 | |
| 171 | if (Current->GetSubtokenCount() == MAX_SUBTOKENS) { |
| 172 | TCharSpan last; // for backward compatibility the last subtoken of the previous multitoken is popped and ... |
| 173 | Current->CorrectLastToken(last); |
| 174 | Tokens.push_back(TParserToken(last)); // ... added to the front of the new multitoken |
| 175 | Current = &Tokens.back(); // new parser token, Current reassigned immediately after push_back() |
| 176 | } |
| 177 | |
| 178 | Current->AddSubtoken(CurCharSpan, PrefixLen, PrefixChar, SuffixChar); |
| 179 | |
| 180 | CurCharSpan.Pos = 0; |
| 181 | CurCharSpan.Len = 0; // it is checked in AddLastToken() |
| 182 | PrefixLen = 0; |
| 183 | PrefixChar = 0; |
| 184 | SuffixChar = 0; |
| 185 | } |
| 186 | void AddIdeograph(size_t len) { |
| 187 | Y_ASSERT(!CurCharSpan.Len && (len == 1 || len == 2)); |
| 188 | Current->AddIdeograph(len); |
nothing calls this directly
no test coverage detected