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

Unified Diff: tools/json_schema_compiler/model.py

Issue 16462004: Add optional schema compiler error messages Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 6 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 d6b6efc1a12f3519777d08b4995fa43d27e8c8ea..b74e3832cc7a9d828672482b52ac2e849b3cb468 100644
--- a/tools/json_schema_compiler/model.py
+++ b/tools/json_schema_compiler/model.py
@@ -51,6 +51,7 @@ class Namespace(object):
- |properties| a map of property names to their model.Property
- |compiler_options| the compiler_options dict, only present if
|include_compiler_options| is True
+ - |generate_error_messages| if error messages should be generated
"""
def __init__(self, json, source_file, include_compiler_options=False):
self.name = json['namespace']
@@ -66,6 +67,7 @@ class Namespace(object):
self.properties = _GetProperties(self, json, self, toplevel_origin)
if include_compiler_options:
self.compiler_options = json.get('compiler_options', {})
+ self.generate_error_messages = json.get('generate_error_messages', False)
class Origin(object):
"""Stores the possible origin of model object as a pair of bools. These are:
« tools/json_schema_compiler/cc_generator.py ('K') | « tools/json_schema_compiler/h_generator.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698