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

Unified Diff: tools/json_schema_compiler/code.py

Issue 11827026: Overhaul JSON Schema Compiler to support a number of features required to (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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/code.py
diff --git a/tools/json_schema_compiler/code.py b/tools/json_schema_compiler/code.py
index 07f657474472ea53fc459eae33df5bcff21cc85b..2c637c587ebe4b7dc74b8a0a97c99801c9b6007a 100644
--- a/tools/json_schema_compiler/code.py
+++ b/tools/json_schema_compiler/code.py
@@ -54,6 +54,13 @@ class Code(object):
return self
+ def Cblock(self, code):
+ """Concatenates another Code object |code| onto this one followed by a
+ blank line, if |code| is non-empty."""
+ if not code.IsEmpty():
+ self.Concat(code).Append()
+ return self
+
def Sblock(self, line=''):
"""Starts a code block.

Powered by Google App Engine
This is Rietveld 408576698