Merge pull request #204 from layzerar/fix_struct_comment

fix comment generation of struct
This commit is contained in:
Robert 2015-10-20 13:25:53 -07:00
commit 07478a6700
2 changed files with 2 additions and 3 deletions

View File

@ -493,7 +493,7 @@ static void GenStruct(const StructDef &struct_def,
StructDef *root_struct_def) {
if (struct_def.generated) return;
GenComment(struct_def.doc_comment, code_ptr, nullptr);
GenComment(struct_def.doc_comment, code_ptr, nullptr, "# ");
BeginClass(struct_def, code_ptr);
if (&struct_def == root_struct_def) {
// Generate a special accessor for the table that has been declared as
@ -660,5 +660,3 @@ bool GeneratePython(const Parser &parser,
}
} // namespace flatbuffers

View File

@ -31,6 +31,7 @@ table Stat {
count:ushort;
}
/// an example documentation comment: monster object
table Monster {
pos:Vec3 (id: 0);
hp:short = 100 (id: 2);