diff options
author | VoR0220 <catalanor0220@gmail.com> | 2016-04-01 01:15:49 +0800 |
---|---|---|
committer | VoR0220 <catalanor0220@gmail.com> | 2016-04-01 01:15:49 +0800 |
commit | 3fc67245bf065837a3565fb89b5ee3061c3a2291 (patch) | |
tree | e37b4c3003a3262a3cb6089f24bf6d2c38e6cec1 /libsolidity/parsing/Token.cpp | |
parent | 1b39d3b5d479aead729b765a67dfeaba0031c1ca (diff) | |
download | dexon-solidity-3fc67245bf065837a3565fb89b5ee3061c3a2291.tar dexon-solidity-3fc67245bf065837a3565fb89b5ee3061c3a2291.tar.gz dexon-solidity-3fc67245bf065837a3565fb89b5ee3061c3a2291.tar.bz2 dexon-solidity-3fc67245bf065837a3565fb89b5ee3061c3a2291.tar.lz dexon-solidity-3fc67245bf065837a3565fb89b5ee3061c3a2291.tar.xz dexon-solidity-3fc67245bf065837a3565fb89b5ee3061c3a2291.tar.zst dexon-solidity-3fc67245bf065837a3565fb89b5ee3061c3a2291.zip |
readding conditionals but with slight changes
Diffstat (limited to 'libsolidity/parsing/Token.cpp')
-rw-r--r-- | libsolidity/parsing/Token.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libsolidity/parsing/Token.cpp b/libsolidity/parsing/Token.cpp index 2fbc3886..c73368e5 100644 --- a/libsolidity/parsing/Token.cpp +++ b/libsolidity/parsing/Token.cpp @@ -132,7 +132,6 @@ tuple<Token::Value, unsigned int, unsigned int> Token::fromIdentifierOrKeyword(s Token::Value keyword = keywordByName(baseType); if (keyword == Token::Bytes) { - solAssert(m != -1, "Invalid type M in fixed command. Should not reach here."); if (0 < m && m <= 32 && positionX == _literal.end()) return make_tuple(Token::BytesM, m, 0); } @@ -140,7 +139,6 @@ tuple<Token::Value, unsigned int, unsigned int> Token::fromIdentifierOrKeyword(s { if (0 < m && m <= 256 && m % 8 == 0 && positionX == _literal.end()) { - solAssert(m != -1, "Invalid type M in fixed command. Should not reach here."); if (keyword == Token::UInt) return make_tuple(Token::UIntM, m, 0); else @@ -157,12 +155,13 @@ tuple<Token::Value, unsigned int, unsigned int> Token::fromIdentifierOrKeyword(s ) { int n = parseSize(positionX + 1, _literal.end()); if ( + 0 <= m && m <= 256 && + 0 <= n && n <= 256 && m + n > 0 && m + n <= 256 && m % 8 == 0 && n % 8 == 0 ) { - solAssert(n != -1, "Invalid type N in fixed command. Should not reach here."); if (keyword == Token::UFixed) return make_tuple(Token::UFixedMxN, m, n); else |