MCPcopy Create free account
hub / github.com/catboost/catboost / GetLeftTokenDelim

Function GetLeftTokenDelim

library/cpp/token/token_structure.h:262–270  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

260}
261
262inline bool GetLeftTokenDelim(const TWideToken& tok, size_t index) {
263 const TTokenStructure& subtokens = tok.SubTokens;
264 Y_ASSERT(index < subtokens.size());
265 if (index == 0)
266 return false;
267 const TCharSpan& subtok = subtokens[index];
268 const TCharSpan& prev = subtokens[index - 1];
269 return (prev.EndPos() + prev.SuffixLen < subtok.Pos - subtok.PrefixLen);
270}
271
272inline wchar16 GetRightTokenDelim(const TWideToken& tok, size_t index) {
273 const TTokenStructure& subtokens = tok.SubTokens;

Callers

nothing calls this directly

Calls 2

EndPosMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected