Revision: 20436
Author:   jkumme...@chromium.org
Date:     Wed Apr  2 13:04:08 2014 UTC
Log:      tools: strip whitespace in gen-postmortem-metadata.py

R=jkumme...@chromium.org

Review URL: https://codereview.chromium.org/221513002

Patch from Ben Noordhuis <b...@strongloop.com>.
http://code.google.com/p/v8/source/detail?r=20436

Modified:
 /branches/bleeding_edge/tools/gen-postmortem-metadata.py

=======================================
--- /branches/bleeding_edge/tools/gen-postmortem-metadata.py Mon Dec 30 11:23:59 2013 UTC +++ /branches/bleeding_edge/tools/gen-postmortem-metadata.py Wed Apr 2 13:04:08 2014 UTC
@@ -434,9 +434,13 @@
 # Emit a block of constants.
 #
 def emit_set(out, consts):
-        for ii in range(0, len(consts)):
-                out.write('int v8dbg_%s = %s;\n' %
-                    (consts[ii]['name'], consts[ii]['value']));
+        # Fix up overzealous parses.  This could be done inside the
+        # parsers but as there are several, it's easiest to do it here.
+        ws = re.compile('\s+')
+        for const in consts:
+                name = ws.sub('', const['name'])
+                value = ws.sub('', str(const['value']))  # Can be a number.
+                out.write('int v8dbg_%s = %s;\n' % (name, value))
         out.write('\n');

 #

--
--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to