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

Unified Diff: tools/create_string_literal.py

Issue 9417012: - Add dart:json, dart:uri and dart:utf8 to the known and builtin libraries. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 10 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
« no previous file with comments | « bin/utf8_sources.gypi ('k') | vm/corelib_impl_in.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/create_string_literal.py
===================================================================
--- tools/create_string_literal.py (revision 4317)
+++ tools/create_string_literal.py (working copy)
@@ -31,8 +31,10 @@
return result
-def makeFile(output_file, input_cc_file, input_files):
+def makeFile(output_file, input_cc_file, include, var_name, input_files):
bootstrap_cc_text = open(input_cc_file).read()
+ bootstrap_cc_text = bootstrap_cc_text.replace("{{INCLUDE}}", include)
+ bootstrap_cc_text = bootstrap_cc_text.replace("{{VAR_NAME}}", var_name)
bootstrap_cc_text = bootstrap_cc_text.replace("{{DART_SOURCE}}",
makeString(input_files))
open(output_file, 'w').write(bootstrap_cc_text)
@@ -49,6 +51,12 @@
parser.add_option("--input_cc",
action="store", type="string",
help="input template file")
+ parser.add_option("--include",
+ action="store", type="string",
+ help="variable name")
+ parser.add_option("--var_name",
+ action="store", type="string",
+ help="variable name")
(options, args) = parser.parse_args()
if not options.output:
@@ -57,6 +65,12 @@
if not len(options.input_cc):
sys.stderr.write('--input_cc not specified\n')
return -1
+ if not len(options.include):
+ sys.stderr.write('--include not specified\n')
+ return -1
+ if not len(options.var_name):
+ sys.stderr.write('--var_name not specified\n')
+ return -1
if len(args) == 0:
sys.stderr.write('No input files specified\n')
return -1
@@ -65,7 +79,11 @@
for arg in args:
files.append(arg)
- if not makeFile(options.output, options.input_cc, files):
+ if not makeFile(options.output,
+ options.input_cc,
+ options.include,
+ options.var_name,
+ files):
return -1
return 0
« no previous file with comments | « bin/utf8_sources.gypi ('k') | vm/corelib_impl_in.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698