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

Unified Diff: tools/json_schema_compiler/model.py

Issue 1982193002: Add enum class support to json_schema_compiler (idl files) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit python style Created 4 years, 7 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/model.py
diff --git a/tools/json_schema_compiler/model.py b/tools/json_schema_compiler/model.py
index e0147b5b4889fb2a86b59a74648a4deb24316051..3243b5799745810828b158cc1ade5ce595afd61e 100644
--- a/tools/json_schema_compiler/model.py
+++ b/tools/json_schema_compiler/model.py
@@ -210,6 +210,7 @@ class Type(object):
self.property_type = PropertyType.ENUM
self.enum_values = [EnumValue(value) for value in json['enum']]
self.cpp_enum_prefix_override = json.get('cpp_enum_prefix_override', None)
+ self.is_class = json.get('class', False)
elif json_type == 'any':
self.property_type = PropertyType.ANY
elif json_type == 'binary':

Powered by Google App Engine
This is Rietveld 408576698