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

Side by Side Diff: grit/node/misc.py

Issue 9924009: Add c_format as a format option. (Closed) Base URL: https://grit-i18n.googlecode.com/svn/trunk
Patch Set: Created 8 years, 8 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
« no previous file with comments | « grit/node/message.py ('k') | grit/test_suite_all.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 '''Miscellaneous node types. 6 '''Miscellaneous node types.
7 ''' 7 '''
8 8
9 import os.path 9 import os.path
10 import re 10 import re
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 return output_files 291 return output_files
292 raise exception.MissingElement() 292 raise exception.MissingElement()
293 293
294 def ItemFormatter(self, t): 294 def ItemFormatter(self, t):
295 if t == 'rc_header': 295 if t == 'rc_header':
296 from grit.format import rc_header # import here to avoid circular dep 296 from grit.format import rc_header # import here to avoid circular dep
297 return rc_header.TopLevel() 297 return rc_header.TopLevel()
298 elif t in ['rc_all', 'rc_translateable', 'rc_nontranslateable']: 298 elif t in ['rc_all', 'rc_translateable', 'rc_nontranslateable']:
299 from grit.format import rc # avoid circular dep 299 from grit.format import rc # avoid circular dep
300 return rc.TopLevel() 300 return rc.TopLevel()
301 elif t == 'c_format':
302 from grit.format import c_format
303 return c_format.TopLevel()
301 elif t == 'resource_map_header': 304 elif t == 'resource_map_header':
302 from grit.format import resource_map 305 from grit.format import resource_map
303 return resource_map.HeaderTopLevel() 306 return resource_map.HeaderTopLevel()
304 elif t in ('resource_map_source', 'resource_file_map_source'): 307 elif t in ('resource_map_source', 'resource_file_map_source'):
305 from grit.format import resource_map 308 from grit.format import resource_map
306 return resource_map.SourceTopLevel() 309 return resource_map.SourceTopLevel()
307 elif t == 'js_map_format': 310 elif t == 'js_map_format':
308 from grit.format import js_map_format 311 from grit.format import js_map_format
309 return js_map_format.TopLevel() 312 return js_map_format.TopLevel()
310 elif t in ('adm', 'plist', 'plist_strings', 'admx', 'adml', 'doc', 'json', 313 elif t in ('adm', 'plist', 'plist_strings', 'admx', 'adml', 'doc', 'json',
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 by parameters of the same name. 400 by parameters of the same name.
398 ''' 401 '''
399 node = IdentifierNode() 402 node = IdentifierNode()
400 node.StartParsing('identifier', parent) 403 node.StartParsing('identifier', parent)
401 node.HandleAttribute('name', name) 404 node.HandleAttribute('name', name)
402 node.HandleAttribute('id', id) 405 node.HandleAttribute('id', id)
403 node.HandleAttribute('comment', comment) 406 node.HandleAttribute('comment', comment)
404 node.EndParsing() 407 node.EndParsing()
405 return node 408 return node
406 Construct = staticmethod(Construct) 409 Construct = staticmethod(Construct)
OLDNEW
« no previous file with comments | « grit/node/message.py ('k') | grit/test_suite_all.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698