diff options
author | Lu Guanqun <guanqun.lu@gmail.com> | 2015-02-28 16:11:59 +0800 |
---|---|---|
committer | Lu Guanqun <guanqun.lu@gmail.com> | 2015-03-08 22:48:53 +0800 |
commit | 1efef53cb373788a7980c85d7d038649214ee0ba (patch) | |
tree | ff88e333d22e874073f68657aa95af8233704723 /AST.h | |
parent | 67ffc3db714bf1a4930a9e340e500285e985222f (diff) | |
download | dexon-solidity-1efef53cb373788a7980c85d7d038649214ee0ba.tar.gz dexon-solidity-1efef53cb373788a7980c85d7d038649214ee0ba.tar.zst dexon-solidity-1efef53cb373788a7980c85d7d038649214ee0ba.zip |
mark an identifier as callable if its next token is '('
Diffstat (limited to 'AST.h')
-rw-r--r-- | AST.h | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -1134,8 +1134,8 @@ public: class Identifier: public PrimaryExpression { public: - Identifier(SourceLocation const& _location, ASTPointer<ASTString> const& _name): - PrimaryExpression(_location), m_name(_name) {} + Identifier(SourceLocation const& _location, ASTPointer<ASTString> const& _name, bool _isCallable): + PrimaryExpression(_location), m_name(_name), m_isCallable(_isCallable) {} virtual void accept(ASTVisitor& _visitor) override; virtual void accept(ASTConstVisitor& _visitor) const override; virtual void checkTypeRequirements() override; @@ -1151,6 +1151,8 @@ public: Declaration const* getReferencedDeclaration() const { return m_referencedDeclaration; } ContractDefinition const* getCurrentContract() const { return m_currentContract; } + bool isCallable() const { return m_isCallable; } + private: ASTPointer<ASTString> m_name; @@ -1159,6 +1161,7 @@ private: /// Stores a reference to the current contract. This is needed because types of base contracts /// change depending on the context. ContractDefinition const* m_currentContract = nullptr; + bool m_isCallable = false; }; /** |