MCPcopy Create free account
hub / github.com/argotorg/solidity / skipMultiLineComment

Method skipMultiLineComment

liblangutil/Scanner.cpp:391–414  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

389}
390
391Token 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
416Token Scanner::scanMultiLineDocComment()
417{

Callers

nothing calls this directly

Calls 2

validateBiDiMarkupFunction · 0.85
positionMethod · 0.45

Tested by

no test coverage detected