aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/parsing/Token.cpp
diff options
context:
space:
mode:
authorVoR0220 <catalanor0220@gmail.com>2016-03-30 00:55:06 +0800
committerVoR0220 <catalanor0220@gmail.com>2016-03-31 00:54:00 +0800
commitddd16d76552d4080ffb82c433ebdd846bfc867ef (patch)
tree4b5124bc45271df627e71a4066597740e9cd8b97 /libsolidity/parsing/Token.cpp
parentc2cf8069968b617ff75d4bc5cf7f72990f71da54 (diff)
downloaddexon-solidity-ddd16d76552d4080ffb82c433ebdd846bfc867ef.tar.gz
dexon-solidity-ddd16d76552d4080ffb82c433ebdd846bfc867ef.tar.zst
dexon-solidity-ddd16d76552d4080ffb82c433ebdd846bfc867ef.zip
Fix for Token::name and token::toString
Diffstat (limited to 'libsolidity/parsing/Token.cpp')
-rw-r--r--libsolidity/parsing/Token.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/libsolidity/parsing/Token.cpp b/libsolidity/parsing/Token.cpp
index 3812a83f..df60aa4b 100644
--- a/libsolidity/parsing/Token.cpp
+++ b/libsolidity/parsing/Token.cpp
@@ -155,16 +155,15 @@ 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
) {
if (keyword == Token::UFixed)
- return make_tuple(Token::UFixed, m, n);
+ return make_tuple(Token::UFixedMxN, m, n);
else
- return make_tuple(Token::Fixed, m, n);
+ return make_tuple(Token::FixedMxN, m, n);
}
}
}