summaryrefslogtreecommitdiff
path: root/coverage/parser.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2014-03-08 06:20:27 -0500
committerNed Batchelder <ned@nedbatchelder.com>2014-03-08 06:20:27 -0500
commit52faddb2586f40e0df03f1ffa8fe73e7d11f5e92 (patch)
treea97f33999d255d74c3f71c957e11b47c637afec7 /coverage/parser.py
parent5b20f798e5c21b3bd278719c9bdde04b3b6b2ec2 (diff)
downloadpython-coveragepy-52faddb2586f40e0df03f1ffa8fe73e7d11f5e92.tar.gz
Hacked-in Mako support.
Diffstat (limited to 'coverage/parser.py')
-rw-r--r--coverage/parser.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/coverage/parser.py b/coverage/parser.py
index de6590a..88f6f29 100644
--- a/coverage/parser.py
+++ b/coverage/parser.py
@@ -13,7 +13,7 @@ from coverage.misc import CoverageException, NoSource, NotPython
class CodeParser(object):
"""Parse code to find executable lines, excluded lines, etc."""
- def __init__(self, text=None, filename=None, exclude=None):
+ def __init__(self, cu, text=None, filename=None, exclude=None):
"""
Source can be provided as `text`, the text itself, or `filename`, from
which the text will be read. Excluded lines are those that match
@@ -161,6 +161,9 @@ class CodeParser(object):
if not empty:
self.statement_starts.update(self.byte_parser._find_statements())
+ def translate_lines(self, lines):
+ return lines
+
def first_line(self, line):
"""Return the first line number of the statement including `line`."""
rng = self.multiline.get(line)