aboutsummaryrefslogtreecommitdiffstats
path: root/Scanner.cpp
diff options
context:
space:
mode:
authorLefteris Karapetsas <lefteris@refu.co>2014-11-28 07:06:38 +0800
committerLefteris Karapetsas <lefteris@refu.co>2014-11-28 07:06:38 +0800
commit034870b4c0e7c2ea6b786e4a023dc8e64ae7314c (patch)
treec148b66220948d9119b7e6941481ef4ec48e3126 /Scanner.cpp
parente11e651929aaffe23d03b706c6770f92a57af6a6 (diff)
downloaddexon-solidity-034870b4c0e7c2ea6b786e4a023dc8e64ae7314c.tar.gz
dexon-solidity-034870b4c0e7c2ea6b786e4a023dc8e64ae7314c.tar.zst
dexon-solidity-034870b4c0e7c2ea6b786e4a023dc8e64ae7314c.zip
Fixing multiline comment parsing in solidity
Diffstat (limited to 'Scanner.cpp')
-rw-r--r--Scanner.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/Scanner.cpp b/Scanner.cpp
index c40d98af..4da9874a 100644
--- a/Scanner.cpp
+++ b/Scanner.cpp
@@ -193,8 +193,8 @@ Token::Value Scanner::scanDocumentationComment()
m_source.get(2) == '/' &&
!m_source.isPastEndOfInput(3))
{
- m_source.advanceBy(3);
addCommentLiteralChar('\n');
+ m_char = m_source.advanceBy(3);
}
else
break; // next line is not a documentation comment, we are done
@@ -793,12 +793,14 @@ char CharStream::advanceAndGet()
return get();
}
-void CharStream::advanceBy(size_t _chars)
+char CharStream::advanceBy(size_t _chars)
{
if (asserts(!isPastEndOfInput(_chars)))
BOOST_THROW_EXCEPTION(InternalCompilerError());
m_pos += _chars;
+
+ return m_source[m_pos];
}
char CharStream::rollback(size_t _amount)