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

Side by Side Diff: tools/code_coverage/croc_scan.py

Issue 8678023: Fix python scripts in src/tools/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes Created 9 years 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 | « tools/code_coverage/croc_html.py ('k') | tools/code_coverage/croc_scan_test.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/python2.4 1 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 # 2 # Use of this source code is governed by a BSD-style license that can be
3 # Copyright 2009, Google Inc. 3 # found in the LICENSE file.
4 # All rights reserved.
5 #
6 # Redistribution and use in source and binary forms, with or without
7 # modification, are permitted provided that the following conditions are
8 # met:
9 #
10 # * Redistributions of source code must retain the above copyright
11 # notice, this list of conditions and the following disclaimer.
12 # * Redistributions in binary form must reproduce the above
13 # copyright notice, this list of conditions and the following disclaimer
14 # in the documentation and/or other materials provided with the
15 # distribution.
16 # * Neither the name of Google Inc. nor the names of its
17 # contributors may be used to endorse or promote products derived from
18 # this software without specific prior written permission.
19 #
20 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 4
32 """Crocodile source scanners.""" 5 """Crocodile source scanners."""
33 6
34 7
35 import re 8 import re
36 9
37 10
38 class Scanner(object): 11 class Scanner(object):
39 """Generic source scanner.""" 12 """Generic source scanner."""
40 13
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 language. 155 language.
183 """ 156 """
184 157
185 if language == 'python': 158 if language == 'python':
186 return PythonScanner().Scan(filename) 159 return PythonScanner().Scan(filename)
187 elif language in ['C', 'C++', 'ObjC', 'ObjC++']: 160 elif language in ['C', 'C++', 'ObjC', 'ObjC++']:
188 return CppScanner().Scan(filename) 161 return CppScanner().Scan(filename)
189 162
190 # Something we don't handle 163 # Something we don't handle
191 return [] 164 return []
OLDNEW
« no previous file with comments | « tools/code_coverage/croc_html.py ('k') | tools/code_coverage/croc_scan_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698