Merge pull request #1576 from ethereum/typeIdentifiers

Type identifiers.
This commit is contained in:
Yoichi Hirai
2017-01-20 16:18:57 +01:00
committed by GitHub
7 changed files with 359 additions and 20 deletions
+3 -1
View File
@@ -59,6 +59,8 @@ public:
/// @returns an identifier of this AST node that is unique for a single compilation run.
size_t id() const { return m_id; }
/// Resets the global ID counter. This invalidates all previous IDs.
static void resetID();
virtual void accept(ASTVisitor& _visitor) = 0;
virtual void accept(ASTConstVisitor& _visitor) const = 0;
@@ -97,7 +99,7 @@ public:
///@}
protected:
size_t m_id = 0;
size_t const m_id = 0;
/// Annotation - is specialised in derived classes, is created upon request (because of polymorphism).
mutable ASTAnnotation* m_annotation = nullptr;