mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Relative paths in import directives.
This commit is contained in:
@@ -56,6 +56,13 @@ Error ASTNode::createTypeError(string const& _description) const
|
||||
return Error(Error::Type::TypeError) << errinfo_sourceLocation(location()) << errinfo_comment(_description);
|
||||
}
|
||||
|
||||
ImportAnnotation& ImportDirective::annotation() const
|
||||
{
|
||||
if (!m_annotation)
|
||||
m_annotation = new ImportAnnotation();
|
||||
return static_cast<ImportAnnotation&>(*m_annotation);
|
||||
}
|
||||
|
||||
map<FixedHash<4>, FunctionTypePointer> ContractDefinition::interfaceFunctions() const
|
||||
{
|
||||
auto exportedFunctionList = interfaceFunctionList();
|
||||
|
||||
@@ -142,6 +142,7 @@ public:
|
||||
virtual void accept(ASTConstVisitor& _visitor) const override;
|
||||
|
||||
ASTString const& identifier() const { return *m_identifier; }
|
||||
virtual ImportAnnotation& annotation() const override;
|
||||
|
||||
private:
|
||||
ASTPointer<ASTString> m_identifier;
|
||||
|
||||
@@ -54,6 +54,12 @@ struct DocumentedAnnotation
|
||||
std::multimap<std::string, DocTag> docTags;
|
||||
};
|
||||
|
||||
struct ImportAnnotation: ASTAnnotation
|
||||
{
|
||||
/// The absolute path of the source unit to import.
|
||||
std::string absolutePath;
|
||||
};
|
||||
|
||||
struct TypeDeclarationAnnotation: ASTAnnotation
|
||||
{
|
||||
/// The name of this type, prefixed by proper namespaces if globally accessible.
|
||||
|
||||
Reference in New Issue
Block a user