diff options
author | Lefteris Karapetsas <lefteris@refu.co> | 2015-02-05 05:02:35 +0800 |
---|---|---|
committer | Lefteris Karapetsas <lefteris@refu.co> | 2015-02-05 05:02:35 +0800 |
commit | 426f9a286071714de61accd04a13ce9d2446ba30 (patch) | |
tree | bc682b079d87eca481b5816a5aace2e6df7bfe32 /AST.cpp | |
parent | dca5f7b57bb5b535930d437c806f48a25cf6b569 (diff) | |
download | dexon-solidity-426f9a286071714de61accd04a13ce9d2446ba30.tar.gz dexon-solidity-426f9a286071714de61accd04a13ce9d2446ba30.tar.zst dexon-solidity-426f9a286071714de61accd04a13ce9d2446ba30.zip |
Tests for ether subdenominations. Work in progress
Diffstat (limited to 'AST.cpp')
-rw-r--r-- | AST.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -599,10 +599,10 @@ Literal::Literal(Location const& _location, Token::Value _token, Token::Value _sub): PrimaryExpression(_location), m_token(_token), m_value(_value) { - solAssert(_sub == Token::ILLEGAL || _sub == Token::ETH_SUB_WEI || - _sub == Token::ETH_SUB_SZABO || _sub == Token::ETH_SUB_FINNEY || - _sub == Token::ETH_SUB_ETHER, "Illegal Token::Value given to Literal ctor"); - m_subDenomination =static_cast<Literal::ethSubDenomination>(_sub); + if(Token::isEtherSubdenomination(_sub)) + m_subDenomination = static_cast<Literal::ethSubDenomination>(_sub); + else + m_subDenomination = Literal::ethSubDenomination::NONE; } void Literal::checkTypeRequirements() |