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

Unified Diff: tools/json_schema_compiler/util_cc_helper.py

Issue 22228002: Add optional schema compiler error messages (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Synced up to latest master. Created 7 years, 4 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 | « tools/json_schema_compiler/util.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/json_schema_compiler/util_cc_helper.py
diff --git a/tools/json_schema_compiler/util_cc_helper.py b/tools/json_schema_compiler/util_cc_helper.py
index 8d490ba5ba345877f1aea32a1765a5b3e9475985..df5b6de0f507444403bf16f86cbf6425f4d7f7fa 100644
--- a/tools/json_schema_compiler/util_cc_helper.py
+++ b/tools/json_schema_compiler/util_cc_helper.py
@@ -77,3 +77,9 @@ class UtilCCHelper(object):
def GetIncludePath(self):
return '#include "tools/json_schema_compiler/util.h"'
+
+ def GetValueTypeString(self, value, is_ptr=False):
+ call = '.GetType()'
+ if is_ptr:
+ call = '->GetType()'
+ return 'json_schema_compiler::util::ValueTypeToString(%s%s)' % (value, call)
« no previous file with comments | « tools/json_schema_compiler/util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698