aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/ast
diff options
context:
space:
mode:
authorJordan Last <jordan.michael.last@gmail.com>2018-09-14 04:29:12 +0800
committerJordan Last <jordan.michael.last@gmail.com>2018-09-14 05:53:06 +0800
commitd0497aacc06524749c20f169dc59d2123f410581 (patch)
tree049e546794c62895b92da4bf1b607bc5310915bb /libsolidity/ast
parente7daed68c1977683546ac3e72d4f84ff538f6711 (diff)
downloaddexon-solidity-d0497aacc06524749c20f169dc59d2123f410581.tar.gz
dexon-solidity-d0497aacc06524749c20f169dc59d2123f410581.tar.zst
dexon-solidity-d0497aacc06524749c20f169dc59d2123f410581.zip
fixing rebase conflicts
add ElementaryTypes::BytesMemory and ElementaryTypes::StringMemory fix rebase conflicts fixing rebase conflicts use make_shared instead of new fix tabs and StateMutability parameter create address and addressType functions, fix spaces in comment fix typo and switch nonpayable to payable fix spaces fix comment again
Diffstat (limited to 'libsolidity/ast')
-rw-r--r--libsolidity/ast/Types.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/libsolidity/ast/Types.h b/libsolidity/ast/Types.h
index a2d18b0a..65a70019 100644
--- a/libsolidity/ast/Types.h
+++ b/libsolidity/ast/Types.h
@@ -319,6 +319,9 @@ protected:
class AddressType: public Type
{
public:
+ static AddressType& address() { static std::shared_ptr<AddressType> addr(std::make_shared<AddressType>(StateMutability::NonPayable)); return *addr; }
+ static AddressType& addressPayable() { static std::shared_ptr<AddressType> addr(std::make_shared<AddressType>(StateMutability::Payable)); return *addr; }
+
virtual Category category() const override { return Category::Address; }
explicit AddressType(StateMutability _stateMutability);
@@ -361,6 +364,7 @@ public:
{
Unsigned, Signed
};
+
virtual Category category() const override { return Category::Integer; }
explicit IntegerType(unsigned _bits, Modifier _modifier = Modifier::Unsigned);
@@ -661,6 +665,9 @@ protected:
class ArrayType: public ReferenceType
{
public:
+ static ArrayType& bytesMemory() { static std::shared_ptr<ArrayType> addr(std::make_shared<ArrayType>(DataLocation::Memory)); return *addr; }
+ static ArrayType& stringMemory() { static std::shared_ptr<ArrayType> addr(std::make_shared<ArrayType>(DataLocation::Memory, true)); return *addr; }
+
virtual Category category() const override { return Category::Array; }
/// Constructor for a byte array ("bytes") and string.