7CompletionContextStrings::CompletionContextStrings(QString code, qsizetype pos)
8 : m_code(code), m_pos(pos)
13 m_filterStart = m_pos;
14 while (m_filterStart != 0) {
15 QChar c = code.at(m_filterStart - 1);
16 if (!c.isLetterOrNumber() && c != u'_')
22 m_baseStart = m_filterStart;
23 while (m_baseStart != 0) {
24 QChar c = code.at(m_baseStart - 1);
25 if (c != u'.' || m_baseStart == 1)
27 c = code.at(m_baseStart - 2);
28 if (!c.isLetterOrNumber() && c != u'_')
30 qsizetype baseEnd = --m_baseStart;
31 while (m_baseStart != 0) {
32 QChar c = code.at(m_baseStart - 1);
33 if (!c.isLetterOrNumber() && c != u'_')
38 if (m_baseStart == baseEnd)
42 m_lineStart = m_baseStart;
43 while (m_lineStart != 0) {
44 QChar c = code.at(m_lineStart - 1);
45 if (c == u'\n' || c == u'\r')
48 m_atLineStart =
false;