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

Unified Diff: tools/generate_stubs/generate_stubs.py

Issue 332823003: generate_stubs: Allow // comments as well as the existing #. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Back to PS1 Created 6 years, 6 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 | « media/audio/pulse/pulse.sigs ('k') | tools/generate_stubs/generate_stubs_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/generate_stubs/generate_stubs.py
diff --git a/tools/generate_stubs/generate_stubs.py b/tools/generate_stubs/generate_stubs.py
index 27f8d5a05d3905c1eb0724d5cc35b96e08796035..46ddb7de19932ab019cee62284e511ad9e65dc6a 100755
--- a/tools/generate_stubs/generate_stubs.py
+++ b/tools/generate_stubs/generate_stubs.py
@@ -390,7 +390,7 @@ def ParseSignatures(infile):
The format of the input file is one C-style function signature per line, no
trailing semicolon. Empty lines are allowed. An empty line is a line that
- consists purely of whitespace. Lines that begin with a # are considered
+ consists purely of whitespace. Lines that begin with a # or // are considered
comment lines and are ignored.
We assume that "int foo(void)" is the same as "int foo()", which is not
@@ -411,7 +411,7 @@ def ParseSignatures(infile):
signatures = []
for line in infile:
line = line.strip()
- if line and line[0] != '#':
+ if line and line[0] != '#' and line[0:2] != '//':
m = SIGNATURE_REGEX.match(line)
if m is None:
raise BadSignatureError('Unparsable line: %s' % line)
« no previous file with comments | « media/audio/pulse/pulse.sigs ('k') | tools/generate_stubs/generate_stubs_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698