Skip to content

Commit

Permalink
Merge pull request #1522 from WalterBright/b21
Browse files Browse the repository at this point in the history
json refactoring
  • Loading branch information
WalterBright committed Jan 20, 2013
2 parents dc43e3b + 6d632c1 commit 2102028
Show file tree
Hide file tree
Showing 8 changed files with 151 additions and 144 deletions.
2 changes: 1 addition & 1 deletion src/aggregate.h
Expand Up @@ -100,7 +100,7 @@ struct AggregateDeclaration : ScopeDsymbol
int isExport();

void emitComment(Scope *sc);
void toJsonBuffer(OutBuffer *buf);
void toJson(JsonOut *json);
void toDocBuffer(OutBuffer *buf, Scope *sc);

// For access checking
Expand Down
4 changes: 2 additions & 2 deletions src/attrib.h
Expand Up @@ -55,7 +55,7 @@ struct AttribDeclaration : Dsymbol
void checkCtorConstInit();
void addLocalClass(ClassDeclarations *);
void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
void toJsonBuffer(OutBuffer *buf);
void toJson(JsonOut *json);
AttribDeclaration *isAttribDeclaration() { return this; }

void toObjFile(int multiobj); // compile to .obj file
Expand Down Expand Up @@ -163,7 +163,7 @@ struct ConditionalDeclaration : AttribDeclaration
Dsymbols *include(Scope *sc, ScopeDsymbol *s);
void addComment(unsigned char *comment);
void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
void toJsonBuffer(OutBuffer *buf);
void toJson(JsonOut *json);
void importAll(Scope *sc);
void setScope(Scope *sc);
};
Expand Down
8 changes: 4 additions & 4 deletions src/declaration.h
Expand Up @@ -140,7 +140,7 @@ struct Declaration : Dsymbol
Dsymbol *search(Loc loc, Identifier *ident, int flags);

void emitComment(Scope *sc);
void toJsonBuffer(OutBuffer *buf);
void toJson(JsonOut *json);
void toDocBuffer(OutBuffer *buf, Scope *sc);

char *mangle();
Expand Down Expand Up @@ -343,7 +343,7 @@ struct ClassInfoDeclaration : VarDeclaration
void semantic(Scope *sc);

void emitComment(Scope *sc);
void toJsonBuffer(OutBuffer *buf);
void toJson(JsonOut *json);

Symbol *toSymbol();
};
Expand All @@ -357,7 +357,7 @@ struct ModuleInfoDeclaration : VarDeclaration
void semantic(Scope *sc);

void emitComment(Scope *sc);
void toJsonBuffer(OutBuffer *buf);
void toJson(JsonOut *json);

Symbol *toSymbol();
};
Expand All @@ -371,7 +371,7 @@ struct TypeInfoDeclaration : VarDeclaration
void semantic(Scope *sc);

void emitComment(Scope *sc);
void toJsonBuffer(OutBuffer *buf);
void toJson(JsonOut *json);

Symbol *toSymbol();
void toObjFile(int multiobj); // compile to .obj file
Expand Down
3 changes: 2 additions & 1 deletion src/dsymbol.h
Expand Up @@ -72,6 +72,7 @@ struct DeleteDeclaration;
struct HdrGenState;
struct OverloadSet;
struct AA;
struct JsonOut;
#ifdef IN_GCC
union tree_node;
typedef union tree_node TYPE;
Expand Down Expand Up @@ -169,7 +170,7 @@ struct Dsymbol : Object
virtual void toHBuffer(OutBuffer *buf, HdrGenState *hgs);
virtual void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
virtual void toDocBuffer(OutBuffer *buf, Scope *sc);
virtual void toJsonBuffer(OutBuffer *buf);
virtual void toJson(JsonOut *json);
virtual unsigned size(Loc loc);
virtual int isforwardRef();
virtual void defineRef(Dsymbol *s);
Expand Down
4 changes: 2 additions & 2 deletions src/enum.h
Expand Up @@ -61,7 +61,7 @@ struct EnumDeclaration : ScopeDsymbol
int isDeprecated(); // is Dsymbol deprecated?

void emitComment(Scope *sc);
void toJsonBuffer(OutBuffer *buf);
void toJson(JsonOut *json);
void toDocBuffer(OutBuffer *buf, Scope *sc);

EnumDeclaration *isEnumDeclaration() { return this; }
Expand All @@ -86,7 +86,7 @@ struct EnumMember : Dsymbol
const char *kind();

void emitComment(Scope *sc);
void toJsonBuffer(OutBuffer *buf);
void toJson(JsonOut *json);
void toDocBuffer(OutBuffer *buf, Scope *sc);

EnumMember *isEnumMember() { return this; }
Expand Down

0 comments on commit 2102028

Please sign in to comment.