| 113 | } |
| 114 | |
| 115 | int MILexer::nextToken(int &pos, int &len) |
| 116 | { |
| 117 | while (m_ptr < m_length) { |
| 118 | const int start = m_ptr; |
| 119 | |
| 120 | const char ch = m_contents[m_ptr]; |
| 121 | Q_ASSERT(ch >= 0); |
| 122 | int kind = 0; |
| 123 | (this->*s_scan_table[static_cast<uchar>(ch)])(&kind); |
| 124 | |
| 125 | switch (kind) { |
| 126 | case Token_whitespaces: |
| 127 | case '\n': |
| 128 | break; |
| 129 | |
| 130 | default: |
| 131 | pos = start; |
| 132 | len = m_ptr - start; |
| 133 | return kind; |
| 134 | } |
| 135 | } |
| 136 | |
| 137 | return 0; |
| 138 | } |
| 139 | |
| 140 | void MILexer::scanChar(int *kind) |
| 141 | { |
no outgoing calls
no test coverage detected