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

Unified Diff: Source/build/scripts/in_file.py

Issue 729393002: Auto generate UseCounter::Feature enum from an .in file (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month 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 | « no previous file | Source/build/scripts/make_use_counter.py » ('j') | Source/build/scripts/make_use_counter.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/build/scripts/in_file.py
diff --git a/Source/build/scripts/in_file.py b/Source/build/scripts/in_file.py
index b33969ecc44b93207b27a07108b5ce59e3a6c5f6..c7bd77ead9244369e6caa1586d8ce4c0edea7d42 100644
--- a/Source/build/scripts/in_file.py
+++ b/Source/build/scripts/in_file.py
@@ -132,6 +132,7 @@ class InFile(object):
def _parse_line(self, line):
args = copy.deepcopy(self._defaults)
+ line = line.split('//')[0] # remove comments
haraken 2014/11/24 09:38:49 I'm not sure but we might want to use '#' instead
philipj_slow 2014/11/24 10:44:59 Also, isn't there already some code for handling /
parts = line.split(' ')
args['name'] = parts[0]
# re-join the rest of the line and split on ','
« no previous file with comments | « no previous file | Source/build/scripts/make_use_counter.py » ('j') | Source/build/scripts/make_use_counter.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698