Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Unified Diff: tools/json_schema_compiler/cpp_type_generator.py

Issue 9836078: Make json_schema_compiler output types in their dependency order. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changing error message to make it clear that circular dependencies are forbidden. Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/json_schema_compiler/h_generator.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/json_schema_compiler/cpp_type_generator.py
diff --git a/tools/json_schema_compiler/cpp_type_generator.py b/tools/json_schema_compiler/cpp_type_generator.py
index 482819cc197fc960b7e45d2ff2d2d2d538d5418c..768ac7e1524ba211d7873e31105a3e0851b657de 100644
--- a/tools/json_schema_compiler/cpp_type_generator.py
+++ b/tools/json_schema_compiler/cpp_type_generator.py
@@ -173,6 +173,11 @@ class CppTypeGenerator(object):
for type_ in types:
c.Append('struct %s;' % type_)
c.Append('}')
+ c.Concat(self.GetNamespaceStart())
+ for (name, type_) in self._namespace.types.items():
+ if not type_.functions:
+ c.Append('struct %s;' % name)
+ c.Concat(self.GetNamespaceEnd())
return c
def GenerateIncludes(self):
« no previous file with comments | « no previous file | tools/json_schema_compiler/h_generator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698