aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/ast/AST.h
diff options
context:
space:
mode:
authorAnurag Dashputre <anurag4u80@gmail.com>2018-08-23 14:26:45 +0800
committerGitHub <noreply@github.com>2018-08-23 14:26:45 +0800
commit8497dcd721ff0a113374c0c1e1778d44265398a6 (patch)
tree2833ab7b3c7513647c0476d0e5d33dc11fcd6951 /libsolidity/ast/AST.h
parent55524788e2829b3a2b9c6c513f78ba2074aa3385 (diff)
parent410d288dfc2e08c42df58c7e01ad5c332ce92727 (diff)
downloaddexon-solidity-8497dcd721ff0a113374c0c1e1778d44265398a6.tar
dexon-solidity-8497dcd721ff0a113374c0c1e1778d44265398a6.tar.gz
dexon-solidity-8497dcd721ff0a113374c0c1e1778d44265398a6.tar.bz2
dexon-solidity-8497dcd721ff0a113374c0c1e1778d44265398a6.tar.lz
dexon-solidity-8497dcd721ff0a113374c0c1e1778d44265398a6.tar.xz
dexon-solidity-8497dcd721ff0a113374c0c1e1778d44265398a6.tar.zst
dexon-solidity-8497dcd721ff0a113374c0c1e1778d44265398a6.zip
Merge branch 'develop' into anurag_issue_3667
Diffstat (limited to 'libsolidity/ast/AST.h')
-rw-r--r--libsolidity/ast/AST.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/libsolidity/ast/AST.h b/libsolidity/ast/AST.h
index 69c6fa05..b953211d 100644
--- a/libsolidity/ast/AST.h
+++ b/libsolidity/ast/AST.h
@@ -685,6 +685,8 @@ public:
virtual bool isLValue() const override;
virtual bool isPartOfExternalInterface() const override { return isPublic(); }
+ /// @returns true iff this variable is the parameter (or return parameter) of a function
+ /// (or function type name or event) or declared inside a function body.
bool isLocalVariable() const;
/// @returns true if this variable is a parameter or return parameter of a function.
bool isCallableParameter() const;
@@ -693,13 +695,27 @@ public:
/// @returns true if this variable is a local variable or return parameter.
bool isLocalOrReturn() const;
/// @returns true if this variable is a parameter (not return parameter) of an external function.
+ /// This excludes parameters of external function type names.
bool isExternalCallableParameter() const;
+ /// @returns true if this variable is a parameter or return parameter of an internal function
+ /// or a function type of internal visibility.
+ bool isInternalCallableParameter() const;
+ /// @returns true iff this variable is a parameter(or return parameter of a library function
+ bool isLibraryFunctionParameter() const;
/// @returns true if the type of the variable does not need to be specified, i.e. it is declared
/// in the body of a function or modifier.
+ /// @returns true if this variable is a parameter of an event.
+ bool isEventParameter() const;
+ /// @returns true if the type of the variable is a reference or mapping type, i.e.
+ /// array, struct or mapping. These types can take a data location (and often require it).
+ /// Can only be called after reference resolution.
+ bool hasReferenceOrMappingType() const;
bool isStateVariable() const { return m_isStateVariable; }
bool isIndexed() const { return m_isIndexed; }
bool isConstant() const { return m_isConstant; }
Location referenceLocation() const { return m_location; }
+ /// @returns a set of allowed storage locations for the variable.
+ std::set<Location> allowedDataLocations() const;
virtual TypePointer type() const override;