aboutsummaryrefslogtreecommitdiffstats
path: root/Types.h
diff options
context:
space:
mode:
authorChristian <c@ethdev.com>2014-10-30 08:20:32 +0800
committerChristian <c@ethdev.com>2014-10-30 08:25:42 +0800
commit7f19f3d133b74bd7ebc96d18b09e145417b7daac (patch)
treea344a8faf9675882eb42f4f83e57f3a825844dcf /Types.h
parent51349bdae53e7d495732085c446ff9488473dcc8 (diff)
downloaddexon-solidity-7f19f3d133b74bd7ebc96d18b09e145417b7daac.tar.gz
dexon-solidity-7f19f3d133b74bd7ebc96d18b09e145417b7daac.tar.zst
dexon-solidity-7f19f3d133b74bd7ebc96d18b09e145417b7daac.zip
Contract compiler and also add ExpressionStatement to AST.
ExpressionStatement functions as glue between Statements and Expressions. This way it is possible to detect when the border between statements and expressions is crossed while walking the AST. Note that ExpressionStatement is not the only border, almost every statement can contains expressions.
Diffstat (limited to 'Types.h')
-rw-r--r--Types.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/Types.h b/Types.h
index 4d56b5ab..828f4809 100644
--- a/Types.h
+++ b/Types.h
@@ -69,7 +69,7 @@ public:
virtual bool operator!=(Type const& _other) const { return !this->operator ==(_other); }
virtual std::string toString() const = 0;
- virtual bytes literalToBigEndian(Literal const&) const { return NullBytes; }
+ virtual u256 literalValue(Literal const&) const { assert(false); }
};
/// Any kind of integer type including hash and address.
@@ -94,7 +94,7 @@ public:
virtual bool operator==(Type const& _other) const override;
virtual std::string toString() const override;
- virtual bytes literalToBigEndian(Literal const& _literal) const override;
+ virtual u256 literalValue(Literal const& _literal) const override;
int getNumBits() const { return m_bits; }
bool isHash() const { return m_modifier == Modifier::HASH || m_modifier == Modifier::ADDRESS; }
@@ -122,7 +122,7 @@ public:
}
virtual std::string toString() const override { return "bool"; }
- virtual bytes literalToBigEndian(Literal const& _literal) const override;
+ virtual u256 literalValue(Literal const& _literal) const override;
};
/// The type of a contract instance, there is one distinct type for each contract definition.