diff options
author | RJ Catalano <rcatalano@macsales.com> | 2016-02-16 00:34:45 +0800 |
---|---|---|
committer | RJ Catalano <rcatalano@macsales.com> | 2016-02-19 01:22:58 +0800 |
commit | d2c0712f36ce4a9148756458533a91bca1cfe44b (patch) | |
tree | 5daf3d26726205c731d697948e4764220b78b268 /libsolidity/parsing/Scanner.cpp | |
parent | 84f2eb461b62a2d36d6784068842b4aa0a5c220a (diff) | |
download | dexon-solidity-d2c0712f36ce4a9148756458533a91bca1cfe44b.tar.gz dexon-solidity-d2c0712f36ce4a9148756458533a91bca1cfe44b.tar.zst dexon-solidity-d2c0712f36ce4a9148756458533a91bca1cfe44b.zip |
added const correctness to extract functions in Token
optimizations added in
more elegant solution created for m declaration
ubuntu wants to get rid of 0 <= first statement...so I will
change returnToken to token
Diffstat (limited to 'libsolidity/parsing/Scanner.cpp')
-rw-r--r-- | libsolidity/parsing/Scanner.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libsolidity/parsing/Scanner.cpp b/libsolidity/parsing/Scanner.cpp index 510d283e..d630d0ab 100644 --- a/libsolidity/parsing/Scanner.cpp +++ b/libsolidity/parsing/Scanner.cpp @@ -387,8 +387,8 @@ void Scanner::scanToken() Token::Value token; // M and N are for the purposes of grabbing different type sizes - unsigned M; - unsigned N; + unsigned m; + unsigned n; do { // Remember the position of the next token @@ -556,7 +556,7 @@ void Scanner::scanToken() break; default: if (isIdentifierStart(m_char)) - tie(token, M, N) = scanIdentifierOrKeyword(); + tie(token, m, n) = scanIdentifierOrKeyword(); else if (isDecimalDigit(m_char)) token = scanNumber(); else if (skipWhitespace()) @@ -573,7 +573,7 @@ void Scanner::scanToken() while (token == Token::Whitespace); m_nextToken.location.end = sourcePos(); m_nextToken.token = token; - m_nextToken.extendedTokenInfo = make_tuple(M,N); + m_nextToken.extendedTokenInfo = make_tuple(m, n); } bool Scanner::scanEscape() |