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

Side by Side Diff: trunk/src/tools/json_schema_compiler/code.py

Issue 25940002: Revert 226826 "This is a preliminary patch to auto-generate the ..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 class Code(object): 5 class Code(object):
6 """A convenience object for constructing code. 6 """A convenience object for constructing code.
7 7
8 Logically each object should be a block of code. All methods except |Render| 8 Logically each object should be a block of code. All methods except |Render|
9 and |IsEmpty| return self. 9 and |IsEmpty| return self.
10 """ 10 """
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 'Named arguments only. Use "%" to escape') 126 'Named arguments only. Use "%" to escape')
127 self._code[i].value = line.value % d 127 self._code[i].value = line.value % d
128 self._code[i].substitute = False 128 self._code[i].substitute = False
129 return self 129 return self
130 130
131 def Render(self): 131 def Render(self):
132 """Renders Code as a string. 132 """Renders Code as a string.
133 """ 133 """
134 return '\n'.join([l.value for l in self._code]) 134 return '\n'.join([l.value for l in self._code])
135 135
136
137 class Line(object): 136 class Line(object):
138 """A line of code. 137 """A line of code.
139 """ 138 """
140 def __init__(self, value, substitute=True): 139 def __init__(self, value, substitute=True):
141 self.value = value 140 self.value = value
142 self.substitute = substitute 141 self.substitute = substitute
OLDNEW
« no previous file with comments | « trunk/src/chrome/common/extensions/api/api.gyp ('k') | trunk/src/tools/json_schema_compiler/cpp_util.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698