aboutsummaryrefslogtreecommitdiffstats
path: root/AST.cpp
diff options
context:
space:
mode:
authorLefteris Karapetsas <lefteris@refu.co>2015-02-04 23:37:54 +0800
committerLefteris Karapetsas <lefteris@refu.co>2015-02-05 00:52:28 +0800
commitdca5f7b57bb5b535930d437c806f48a25cf6b569 (patch)
tree04ee06c48c7ca6c4f012c6778bb9ea01248582d9 /AST.cpp
parentdb263bd9d751f69f9d8d9484ff916d38b86c68c4 (diff)
downloaddexon-solidity-dca5f7b57bb5b535930d437c806f48a25cf6b569.tar.gz
dexon-solidity-dca5f7b57bb5b535930d437c806f48a25cf6b569.tar.zst
dexon-solidity-dca5f7b57bb5b535930d437c806f48a25cf6b569.zip
Adding ether subdenominations after constan literals
Diffstat (limited to 'AST.cpp')
-rw-r--r--AST.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/AST.cpp b/AST.cpp
index 6028c07c..f0c60e05 100644
--- a/AST.cpp
+++ b/AST.cpp
@@ -594,6 +594,17 @@ void ElementaryTypeNameExpression::checkTypeRequirements()
m_type = make_shared<TypeType>(Type::fromElementaryTypeName(m_typeToken));
}
+Literal::Literal(Location const& _location, Token::Value _token,
+ ASTPointer<ASTString> const& _value,
+ 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);
+}
+
void Literal::checkTypeRequirements()
{
m_type = Type::forLiteral(*this);