diff options
author | chriseth <c@ethdev.com> | 2016-01-04 18:47:11 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2016-01-04 18:47:11 +0800 |
commit | e27bfa023d9aa398c3d0afcef6095082474e69fe (patch) | |
tree | 2f2d16900e78841ca6d7f983f227db5cc13cecd1 /libsolidity/ast | |
parent | 6b711d0527823ff6287fe869579260bb27feacdd (diff) | |
parent | 0e2fa39fadb9ccf45408e047c2b85d62847eb9f2 (diff) | |
download | dexon-solidity-e27bfa023d9aa398c3d0afcef6095082474e69fe.tar.gz dexon-solidity-e27bfa023d9aa398c3d0afcef6095082474e69fe.tar.zst dexon-solidity-e27bfa023d9aa398c3d0afcef6095082474e69fe.zip |
Merge pull request #317 from chriseth/pathsEverywhere
Use paths instead of simple identifiers wherever possible.
Diffstat (limited to 'libsolidity/ast')
-rw-r--r-- | libsolidity/ast/AST.h | 12 | ||||
-rw-r--r-- | libsolidity/ast/ASTPrinter.cpp | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/libsolidity/ast/AST.h b/libsolidity/ast/AST.h index 84e9e706..604a12a0 100644 --- a/libsolidity/ast/AST.h +++ b/libsolidity/ast/AST.h @@ -340,7 +340,7 @@ class InheritanceSpecifier: public ASTNode public: InheritanceSpecifier( SourceLocation const& _location, - ASTPointer<Identifier> const& _baseName, + ASTPointer<UserDefinedTypeName> const& _baseName, std::vector<ASTPointer<Expression>> _arguments ): ASTNode(_location), m_baseName(_baseName), m_arguments(_arguments) {} @@ -348,11 +348,11 @@ public: virtual void accept(ASTVisitor& _visitor) override; virtual void accept(ASTConstVisitor& _visitor) const override; - Identifier const& name() const { return *m_baseName; } + UserDefinedTypeName const& name() const { return *m_baseName; } std::vector<ASTPointer<Expression>> const& arguments() const { return m_arguments; } private: - ASTPointer<Identifier> m_baseName; + ASTPointer<UserDefinedTypeName> m_baseName; std::vector<ASTPointer<Expression>> m_arguments; }; @@ -366,7 +366,7 @@ class UsingForDirective: public ASTNode public: UsingForDirective( SourceLocation const& _location, - ASTPointer<Identifier> const& _libraryName, + ASTPointer<UserDefinedTypeName> const& _libraryName, ASTPointer<TypeName> const& _typeName ): ASTNode(_location), m_libraryName(_libraryName), m_typeName(_typeName) {} @@ -374,12 +374,12 @@ public: virtual void accept(ASTVisitor& _visitor) override; virtual void accept(ASTConstVisitor& _visitor) const override; - Identifier const& libraryName() const { return *m_libraryName; } + UserDefinedTypeName const& libraryName() const { return *m_libraryName; } /// @returns the type name the library is attached to, null for `*`. TypeName const* typeName() const { return m_typeName.get(); } private: - ASTPointer<Identifier> m_libraryName; + ASTPointer<UserDefinedTypeName> m_libraryName; ASTPointer<TypeName> m_typeName; }; diff --git a/libsolidity/ast/ASTPrinter.cpp b/libsolidity/ast/ASTPrinter.cpp index b2ce1c26..d4f13e47 100644 --- a/libsolidity/ast/ASTPrinter.cpp +++ b/libsolidity/ast/ASTPrinter.cpp @@ -63,7 +63,7 @@ bool ASTPrinter::visit(ContractDefinition const& _node) bool ASTPrinter::visit(InheritanceSpecifier const& _node) { - writeLine("InheritanceSpecifier \"" + _node.name().name() + "\""); + writeLine("InheritanceSpecifier"); printSourcePart(_node); return goDeeper(); } |