aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/parsing
diff options
context:
space:
mode:
authorYoichi Hirai <i@yoichihirai.com>2016-12-01 00:28:07 +0800
committerYoichi Hirai <i@yoichihirai.com>2016-12-01 00:28:07 +0800
commiteaab71294476f46513678be2e8cad02589d141dc (patch)
tree5ee25f39ba1fe5d2424a7969d546f3a0304ec863 /libsolidity/parsing
parentac357d12252ceb113a823a400418a59a94521c71 (diff)
downloaddexon-solidity-eaab71294476f46513678be2e8cad02589d141dc.tar.gz
dexon-solidity-eaab71294476f46513678be2e8cad02589d141dc.tar.zst
dexon-solidity-eaab71294476f46513678be2e8cad02589d141dc.zip
parser: recognize an end of comment of the form `**/` at the end of a multi-line doc comment
This fixes #1433
Diffstat (limited to 'libsolidity/parsing')
-rw-r--r--libsolidity/parsing/Scanner.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/libsolidity/parsing/Scanner.cpp b/libsolidity/parsing/Scanner.cpp
index 6115101e..3623f23f 100644
--- a/libsolidity/parsing/Scanner.cpp
+++ b/libsolidity/parsing/Scanner.cpp
@@ -327,7 +327,12 @@ Token::Value Scanner::scanMultiLineDocComment()
if (isLineTerminator(m_char))
{
skipWhitespace();
- if (!m_source.isPastEndOfInput(1) && m_source.get(0) == '*' && m_source.get(1) != '/')
+ if (!m_source.isPastEndOfInput(1) && m_source.get(0) == '*' && m_source.get(1) == '*')
+ { // it is unknown if this leads to the end of the comment
+ addCommentLiteralChar('*');
+ advance();
+ }
+ else if (!m_source.isPastEndOfInput(1) && m_source.get(0) == '*' && m_source.get(1) != '/')
{ // skip first '*' in subsequent lines
if (charsAdded)
addCommentLiteralChar('\n');