| 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):
|
| """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):
|
|
|