|
|
@ -49,19 +49,13 @@ const std::set<std::string> c_predefinedContracts = |
|
|
|
|
|
|
|
namespace |
|
|
|
{ |
|
|
|
using namespace dev::solidity; |
|
|
|
class CollectDeclarationsVisitor: public ASTConstVisitor |
|
|
|
{ |
|
|
|
public: |
|
|
|
using namespace dev::solidity; |
|
|
|
class CollectDeclarationsVisitor: public ASTConstVisitor |
|
|
|
{ |
|
|
|
public: |
|
|
|
CollectDeclarationsVisitor(QHash<LocationPair, QString>* _functions, QHash<LocationPair, SolidityDeclaration>* _locals, QHash<unsigned, SolidityDeclaration>* _storage): |
|
|
|
m_functions(_functions), m_locals(_locals), m_storage(_storage), m_functionScope(false), m_storageSlot(0) {} |
|
|
|
private: |
|
|
|
QHash<LocationPair, QString>* m_functions; |
|
|
|
QHash<LocationPair, SolidityDeclaration>* m_locals; |
|
|
|
QHash<unsigned, SolidityDeclaration>* m_storage; |
|
|
|
bool m_functionScope; |
|
|
|
uint m_storageSlot; |
|
|
|
|
|
|
|
private: |
|
|
|
LocationPair nodeLocation(ASTNode const& _node) |
|
|
|
{ |
|
|
|
return LocationPair(_node.getLocation().start, _node.getLocation().end); |
|
|
@ -128,7 +122,14 @@ namespace |
|
|
|
m_storage->insert(m_storageSlot++, decl); |
|
|
|
return true; |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
private: |
|
|
|
QHash<LocationPair, QString>* m_functions; |
|
|
|
QHash<LocationPair, SolidityDeclaration>* m_locals; |
|
|
|
QHash<unsigned, SolidityDeclaration>* m_storage; |
|
|
|
bool m_functionScope; |
|
|
|
uint m_storageSlot; |
|
|
|
}; |
|
|
|
} |
|
|
|
|
|
|
|
void BackgroundWorker::queueCodeChange(int _jobId) |
|
|
|