Skip to content

Commit

Permalink
Add virtual method isAnonDeclaration to Dsymbol
Browse files Browse the repository at this point in the history
  • Loading branch information
ibuclaw committed Sep 27, 2015
1 parent 3b02f50 commit d3fdbcb
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/attrib.d
Original file line number Diff line number Diff line change
Expand Up @@ -701,6 +701,11 @@ public:
return (isunion ? "anonymous union" : "anonymous struct");
}

override final AnonDeclaration isAnonDeclaration()
{
return this;
}

override void accept(Visitor v)
{
v.visit(this);
Expand Down
1 change: 1 addition & 0 deletions src/attrib.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ class AnonDeclaration : public AttribDeclaration
void semantic(Scope *sc);
void setFieldOffset(AggregateDeclaration *ad, unsigned *poffset, bool isunion);
const char *kind();
AnonDeclaration *isAnonDeclaration() { return this; }
void accept(Visitor *v) { v->visit(this); }
};

Expand Down
5 changes: 5 additions & 0 deletions src/dsymbol.d
Original file line number Diff line number Diff line change
Expand Up @@ -1143,6 +1143,11 @@ public:
return null;
}

AnonDeclaration isAnonDeclaration()
{
return null;
}

OverloadSet isOverloadSet()
{
return null;
Expand Down
1 change: 1 addition & 0 deletions src/dsymbol.h
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ class Dsymbol : public RootObject
virtual DeleteDeclaration *isDeleteDeclaration() { return NULL; }
virtual SymbolDeclaration *isSymbolDeclaration() { return NULL; }
virtual AttribDeclaration *isAttribDeclaration() { return NULL; }
virtual AnonDeclaration *isAnonDeclaration() { return NULL; }
virtual OverloadSet *isOverloadSet() { return NULL; }
virtual void accept(Visitor *v) { v->visit(this); }
};
Expand Down

0 comments on commit d3fdbcb

Please sign in to comment.