aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/Scanner.cpp
diff options
context:
space:
mode:
authorLianaHus <liana@ethdev.com>2015-09-10 20:26:34 +0800
committerLianaHus <liana@ethdev.com>2015-09-10 20:26:34 +0800
commit845bcf8db09c536c157a7575981daa42b6e6e938 (patch)
tree07557b43dc18366d3ce9be99c6d63737b4864437 /libsolidity/Scanner.cpp
parent3fc2561223c989885e1473cb29394bb07a26492f (diff)
downloaddexon-solidity-845bcf8db09c536c157a7575981daa42b6e6e938.tar.gz
dexon-solidity-845bcf8db09c536c157a7575981daa42b6e6e938.tar.zst
dexon-solidity-845bcf8db09c536c157a7575981daa42b6e6e938.zip
- added tests to test empty comment
- fixed skipSingleLineComment - some style fixes
Diffstat (limited to 'libsolidity/Scanner.cpp')
-rw-r--r--libsolidity/Scanner.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/libsolidity/Scanner.cpp b/libsolidity/Scanner.cpp
index 374f78e4..d67b6423 100644
--- a/libsolidity/Scanner.cpp
+++ b/libsolidity/Scanner.cpp
@@ -224,7 +224,9 @@ Token::Value Scanner::skipSingleLineComment()
// to be part of the single-line comment; it is recognized
// separately by the lexical grammar and becomes part of the
// stream of input elements for the syntactic grammar
- while (advance() && !isLineTerminator(m_char)) { };
+ while (!isLineTerminator(m_char))
+ if (!advance()) break;
+
return Token::Whitespace;
}