aboutsummaryrefslogtreecommitdiffstats
path: root/AST.h
diff options
context:
space:
mode:
authorLiana Husikyan <liana@ethdev.com>2015-03-12 21:15:04 +0800
committerLiana Husikyan <liana@ethdev.com>2015-03-16 17:46:46 +0800
commit7d6357ae531f604387fc1f91799fca9a9102e856 (patch)
tree4cb419dd9d6e09ca827dc450287c3d5339b4c082 /AST.h
parent67cd3a7180023f613efda64f4f4d2b1bc37990c6 (diff)
downloaddexon-solidity-7d6357ae531f604387fc1f91799fca9a9102e856.tar.gz
dexon-solidity-7d6357ae531f604387fc1f91799fca9a9102e856.tar.zst
dexon-solidity-7d6357ae531f604387fc1f91799fca9a9102e856.zip
- added isPartOfExternalInterface to Declaration
- changed position for the constant specifier. now it goes after type: <type> <constant> <name> = <value> - removed tests for constant functions, checkings for constant function doesn't belong to this story
Diffstat (limited to 'AST.h')
-rw-r--r--AST.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/AST.h b/AST.h
index e959ba24..6a269e15 100644
--- a/AST.h
+++ b/AST.h
@@ -156,6 +156,7 @@ public:
/// contract types.
virtual TypePointer getType(ContractDefinition const* m_currentContract = nullptr) const = 0;
virtual bool isLValue() const { return false; }
+ virtual bool isPartOfExternalInterface() const { return false; };
protected:
virtual Visibility getDefaultVisibility() const { return Visibility::Public; }
@@ -415,6 +416,7 @@ public:
getVisibility() >= Visibility::Internal;
}
virtual TypePointer getType(ContractDefinition const*) const override;
+ virtual bool isPartOfExternalInterface() const override { return isPublic() && !m_isConstructor && !getName().empty(); }
/// Checks that all parameters have allowed types and calls checkTypeRequirements on the body.
void checkTypeRequirements();
@@ -468,6 +470,8 @@ public:
void setType(std::shared_ptr<Type const> const& _type) { m_type = _type; }
virtual bool isLValue() const override;
+ virtual bool isPartOfExternalInterface() const override { return isPublic() && !m_isConstant; }
+
void checkTypeRequirements();
bool isLocalVariable() const { return !!dynamic_cast<FunctionDefinition const*>(getScope()); }