Chromium Code Reviews| 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..53fd0e42b1472386a1a906fc2052ae34553ebb72 100644 |
| --- a/tools/json_schema_compiler/code.py |
| +++ b/tools/json_schema_compiler/code.py |
| @@ -63,6 +63,12 @@ class Code(object): |
| self._indent_level += self._indent_size |
| return self |
| + def SblockBare(self): |
|
not at google - send to devlin
2013/01/25 18:14:33
The nice thing about the other operations (with th
sashab
2013/01/29 08:27:13
Sure - I'm not going to change the default line ar
not at google - send to devlin
2013/01/29 16:37:08
Well, if Append didn't add a line given a blank ar
sashab
2013/02/04 05:09:27
Done.
|
| + """Starts a code block by increasing the indent, without adding a line. |
| + """ |
| + self._indent_level += self._indent_size |
| + return self |
| + |
| def Eblock(self, line=''): |
| """Ends a code block by decreasing and then appending a line (or a blank |
| line if not given). |
| @@ -74,6 +80,12 @@ class Code(object): |
| self.Append(line) |
| return self |
| + def EblockBare(self): |
| + """Ends a code block by decreasing the indent, without adding a line. |
| + """ |
| + self._indent_level -= self._indent_size |
| + return self |
| + |
| def Comment(self, comment, comment_prefix='// '): |
| """Adds the given string as a comment. |