| 389 | } |
| 390 | |
| 391 | Token Scanner::skipMultiLineComment() |
| 392 | { |
| 393 | size_t startPosition = m_source.position(); |
| 394 | while (!isSourcePastEndOfInput()) |
| 395 | { |
| 396 | char prevChar = m_char; |
| 397 | advance(); |
| 398 | |
| 399 | // If we have reached the end of the multi-line comment, we |
| 400 | // consume the '/' and insert a whitespace. This way all |
| 401 | // multi-line comments are treated as whitespace. |
| 402 | if (prevChar == '*' && m_char == '/') |
| 403 | { |
| 404 | ScannerError unicodeDirectionError = validateBiDiMarkup(m_source, startPosition); |
| 405 | if (unicodeDirectionError != ScannerError::NoError) |
| 406 | return setError(unicodeDirectionError); |
| 407 | |
| 408 | m_char = ' '; |
| 409 | return Token::Whitespace; |
| 410 | } |
| 411 | } |
| 412 | // Unterminated multi-line comment. |
| 413 | return setError(ScannerError::IllegalCommentTerminator); |
| 414 | } |
| 415 | |
| 416 | Token Scanner::scanMultiLineDocComment() |
| 417 | { |
nothing calls this directly
no test coverage detected