From 8cc4ffa19dd13d8433878aab3458f6c7572e74b5 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sat, 8 Mar 2014 06:20:27 -0500 Subject: Hacked-in Mako support. --- coverage/parser.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'coverage/parser.py') diff --git a/coverage/parser.py b/coverage/parser.py index de6590aa..88f6f29e 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) -- cgit v1.2.1