Skip to content

Commit

Permalink
Printing of ProtDeclaration is handled by visitor
Browse files Browse the repository at this point in the history
  • Loading branch information
Dicebot committed Aug 24, 2014
1 parent 65ff492 commit 9432019
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
9 changes: 1 addition & 8 deletions src/attrib.c
Expand Up @@ -551,21 +551,14 @@ ProtDeclaration::ProtDeclaration(Loc loc, Prot p, Dsymbols *decl)
Dsymbol *ProtDeclaration::syntaxCopy(Dsymbol *s)
{
assert(!s);
return new ProtDeclaration(protection, Dsymbol::arraySyntaxCopy(decl));
return new ProtDeclaration(this->loc, protection, Dsymbol::arraySyntaxCopy(decl));
}

Scope *ProtDeclaration::newScope(Scope *sc)
{
return createNewScope(sc, sc->stc, sc->linkage, this->protection, 1, sc->structalign);
}

void ProtDeclaration::toCBuffer(OutBuffer *buf, HdrGenState *hgs)
{
protectionToBuffer(buf, protection);
buf->writeByte(' ');
AttribDeclaration::toCBuffer(buf, hgs);
}

void ProtDeclaration::semantic(Scope* sc)
{
AttribDeclaration::semantic(sc);
Expand Down
1 change: 0 additions & 1 deletion src/attrib.h
Expand Up @@ -112,7 +112,6 @@ class ProtDeclaration : public AttribDeclaration

Dsymbol *syntaxCopy(Dsymbol *s);
Scope *newScope(Scope *sc);
void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
const char *kind();
const char *toPrettyChars(bool unused);
void semantic(Scope* sc);
Expand Down

0 comments on commit 9432019

Please sign in to comment.