aboutsummaryrefslogtreecommitdiffstats
path: root/AST.cpp
diff options
context:
space:
mode:
authorGav Wood <g@ethdev.com>2015-02-06 09:12:19 +0800
committerGav Wood <g@ethdev.com>2015-02-06 09:12:19 +0800
commit59a390937637111ebdadf2d3af57122a10bdd012 (patch)
tree90c40a41014f93004d932b6078c386c4a336519b /AST.cpp
parente86c4602c583696a466da5b431c8f5c8e8e98217 (diff)
parentc966ff246fefad4d9522eb87f4cf80dd51a92465 (diff)
downloaddexon-solidity-59a390937637111ebdadf2d3af57122a10bdd012.tar.gz
dexon-solidity-59a390937637111ebdadf2d3af57122a10bdd012.tar.zst
dexon-solidity-59a390937637111ebdadf2d3af57122a10bdd012.zip
Merge pull request #953 from LefterisJP/sol_ethSubDenominations
Solidity ether subdenominations
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 dfb677f7..d1c7d537 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)
+{
+ if (Token::isEtherSubdenomination(_sub))
+ m_subDenomination = static_cast<Literal::SubDenomination>(_sub);
+ else
+ m_subDenomination = Literal::SubDenomination::None;
+}
+
void Literal::checkTypeRequirements()
{
m_type = Type::forLiteral(*this);