Commit ac4cbf02 authored by Stefan Behnel's avatar Stefan Behnel

pass relevant scopes into _save_annotation_body() in AnnotationCCodeWriter

parent b319d71b
...@@ -175,10 +175,11 @@ class AnnotationCCodeWriter(CCodeWriter): ...@@ -175,10 +175,11 @@ class AnnotationCCodeWriter(CCodeWriter):
else: else:
coverage_timestamp = covered_lines = None coverage_timestamp = covered_lines = None
annotation_items = dict(self.annotations[source_filename]) annotation_items = dict(self.annotations[source_filename])
scopes = dict(self.scopes[source_filename])
outlist = [] outlist = []
outlist.extend(self._save_annotation_header(c_file, source_filename, coverage_timestamp)) outlist.extend(self._save_annotation_header(c_file, source_filename, coverage_timestamp))
outlist.extend(self._save_annotation_body(code, generated_code, annotation_items, covered_lines)) outlist.extend(self._save_annotation_body(code, generated_code, annotation_items, scopes, covered_lines))
outlist.extend(self._save_annotation_footer()) outlist.extend(self._save_annotation_footer())
return ''.join(outlist) return ''.join(outlist)
...@@ -214,7 +215,7 @@ class AnnotationCCodeWriter(CCodeWriter): ...@@ -214,7 +215,7 @@ class AnnotationCCodeWriter(CCodeWriter):
HtmlFormatter(nowrap=True)) HtmlFormatter(nowrap=True))
return html_code return html_code
def _save_annotation_body(self, cython_code, generated_code, annotation_items, covered_lines=None): def _save_annotation_body(self, cython_code, generated_code, annotation_items, scopes, covered_lines=None):
outlist = [u'<div class="cython">'] outlist = [u'<div class="cython">']
pos_comment_marker = u'/* \N{HORIZONTAL ELLIPSIS} */\n' pos_comment_marker = u'/* \N{HORIZONTAL ELLIPSIS} */\n'
new_calls_map = dict( new_calls_map = dict(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment