diff options
author | chriseth <chris@ethereum.org> | 2016-12-01 19:40:52 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-01 19:40:52 +0800 |
commit | 5d1d81d270430815c15fd09f612f6299ddda68ff (patch) | |
tree | 2c239f020f7a9e431f712a91fa9da4ec787761c9 /libsolidity | |
parent | 67f274f66c65058c784e610767144cfe32a7dd2c (diff) | |
parent | 610027cd26dda1cded357f62585e75eed3cb0e48 (diff) | |
download | dexon-solidity-5d1d81d270430815c15fd09f612f6299ddda68ff.tar dexon-solidity-5d1d81d270430815c15fd09f612f6299ddda68ff.tar.gz dexon-solidity-5d1d81d270430815c15fd09f612f6299ddda68ff.tar.bz2 dexon-solidity-5d1d81d270430815c15fd09f612f6299ddda68ff.tar.lz dexon-solidity-5d1d81d270430815c15fd09f612f6299ddda68ff.tar.xz dexon-solidity-5d1d81d270430815c15fd09f612f6299ddda68ff.tar.zst dexon-solidity-5d1d81d270430815c15fd09f612f6299ddda68ff.zip |
Merge pull request #1454 from ethereum/end-of-comment
parser: recognize an end of comment of the form `**/`
Diffstat (limited to 'libsolidity')
-rw-r--r-- | libsolidity/parsing/Scanner.cpp | 7 |
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'); |