| 182 | } |
| 183 | |
| 184 | void TextProcessing::ReadLine(Token* token) |
| 185 | { |
| 186 | // Set line start but reset its length |
| 187 | token->Start = _cursor; |
| 188 | token->Length = 0; |
| 189 | |
| 190 | // Read until can |
| 191 | while (_position < _length) |
| 192 | { |
| 193 | // Read char |
| 194 | char c = moveForward(); |
| 195 | |
| 196 | // Check new-line char |
| 197 | if (c == '\n') |
| 198 | { |
| 199 | return; |
| 200 | } |
| 201 | |
| 202 | // Move to the next char |
| 203 | token->Length++; |
| 204 | } |
| 205 | } |
| 206 | |
| 207 | void TextProcessing::ReadLine() |
| 208 | { |
no outgoing calls
no test coverage detected