aboutsummaryrefslogtreecommitdiffstats
path: root/Scanner.cpp
diff options
context:
space:
mode:
authorLefteris Karapetsas <lefteris@refu.co>2014-12-18 23:27:17 +0800
committerLefteris Karapetsas <lefteris@refu.co>2014-12-18 23:27:17 +0800
commitd97bdba471cf3da5bc292c0252a062bc7e273b72 (patch)
treeaa79dd9069b99f60f50860bfa7310f01d388f5d7 /Scanner.cpp
parenta6b0fba22748ffa8a73d505f31bec8630f434f39 (diff)
downloaddexon-solidity-d97bdba471cf3da5bc292c0252a062bc7e273b72.tar.gz
dexon-solidity-d97bdba471cf3da5bc292c0252a062bc7e273b72.tar.zst
dexon-solidity-d97bdba471cf3da5bc292c0252a062bc7e273b72.zip
Adressing some natspec issues
Diffstat (limited to 'Scanner.cpp')
-rw-r--r--Scanner.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/Scanner.cpp b/Scanner.cpp
index 69b61ce4..90a3b454 100644
--- a/Scanner.cpp
+++ b/Scanner.cpp
@@ -328,6 +328,7 @@ Token::Value Scanner::scanMultiLineDocComment()
void Scanner::scanToken()
{
+ int savedPosition;
m_nextToken.literal.clear();
m_nextSkippedComment.literal.clear();
Token::Value token;
@@ -428,6 +429,7 @@ void Scanner::scanToken()
break;
case '/':
// / // /* /=
+ savedPosition = getSourcePos();
advance();
if (m_char == '/')
{
@@ -436,7 +438,7 @@ void Scanner::scanToken()
else if (m_char == '/')
{
Token::Value comment;
- m_nextSkippedComment.location.start = getSourcePos();
+ m_nextSkippedComment.location.start = savedPosition;
comment = scanSingleLineDocComment();
m_nextSkippedComment.location.end = getSourcePos();
m_nextSkippedComment.token = comment;
@@ -447,12 +449,13 @@ void Scanner::scanToken()
}
else if (m_char == '*')
{
+ // /** doxygent style natspec comment
if (!advance()) /* slash star comment before EOS */
token = Token::WHITESPACE;
else if (m_char == '*')
{
Token::Value comment;
- m_nextSkippedComment.location.start = getSourcePos();
+ m_nextSkippedComment.location.start = savedPosition;
comment = scanMultiLineDocComment();
m_nextSkippedComment.location.end = getSourcePos();
m_nextSkippedComment.token = comment;