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

Unified Diff: tools/json_schema_compiler/cpp_type_generator.py

Issue 10907151: Extensions Docs Server: Enum values do not show up if enum is a type (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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
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 95329c3f548614603df6fd0849879f852c57c086..b51edfb639047c48aa5eb6bfb18237e05f377585 100644
--- a/tools/json_schema_compiler/cpp_type_generator.py
+++ b/tools/json_schema_compiler/cpp_type_generator.py
@@ -222,7 +222,8 @@ class CppTypeGenerator(object):
'name': type_name,
'item_type': self.GetType(namespace.types[type_].item_type,
wrap_optional=True)})
- else:
+ # Enums cannot be forward declared.
+ elif namespace.types[type_].type_ != PropertyType.ENUM:
c.Append('struct %s;' % type_name)
c.Append('}')
c.Concat(self.GetNamespaceStart())
« no previous file with comments | « no previous file | tools/json_schema_compiler/model.py » ('j') | tools/json_schema_compiler/test/font_settings.json » ('J')

Powered by Google App Engine
This is Rietveld 408576698