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

Unified Diff: tools/json_schema_compiler/code.py

Issue 11747025: Run the JSON Schema Compiler's bundle compilation on JSON files. Previously it (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: restore missing registrations Created 7 years, 12 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..5230a934ccf71cd8ba126169dbdf996b26ad850a 100644
--- a/tools/json_schema_compiler/code.py
+++ b/tools/json_schema_compiler/code.py
@@ -14,15 +14,17 @@ class Code(object):
self._indent_size = indent_size
self._comment_length = comment_length
- def Append(self, line='', substitute=True):
+ def Append(self, line='', substitute=True, indent=None):
asargent_no_longer_on_chrome 2013/01/09 18:09:07 would "indent_level" be a better name to more clea
not at google - send to devlin 2013/01/09 18:46:18 Done.
"""Appends a line of code at the current indent level or just a newline if
line is not specified. Trailing whitespace is stripped.
substitute: indicated whether this line should be affected by
code.Substitute().
"""
- self._code.append(Line(((' ' * self._indent_level) + line).rstrip(),
- substitute=substitute))
+ if indent is None:
+ indent = self._indent_level
+ self._code.append(Line(((' ' * indent) + line).rstrip(),
+ substitute=substitute))
return self
def IsEmpty(self):

Powered by Google App Engine
This is Rietveld 408576698