File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -21,18 +21,18 @@ import re
21
21
import subprocess
22
22
import sys
23
23
24
- line_pattern = re .compile (r'^// ###setline ([0-9 ]+) "([^" ]+)" \s*' )
24
+ line_pattern = re .compile (r'^// ###sourceLocation\(file:\s*"([^" ]+)",\s*line:\s*([0-9 ]+)\s*\) ' )
25
25
26
26
27
27
def _make_line_map (filename , stream = None ):
28
28
"""
29
29
>>> from StringIO import StringIO
30
30
>>> _make_line_map('box',
31
- ... StringIO('''// ###setline 3 "foo.bar"
31
+ ... StringIO('''// ###sourceLocation(file: "foo.bar", line: 3)
32
32
... line 2
33
33
... line 3
34
34
... line 4
35
- ... // ###setline 20 "baz.txt"
35
+ ... // ###sourceLocation(file: "baz.txt", line: 20)
36
36
... line 6
37
37
... line 7
38
38
... '''))
@@ -43,7 +43,7 @@ def _make_line_map(filename, stream=None):
43
43
for i , l in enumerate (input .readlines ()):
44
44
m = line_pattern .match (l )
45
45
if m :
46
- result .append ((i + 1 , m .group (2 ), int (m .group (1 ))))
46
+ result .append ((i + 1 , m .group (1 ), int (m .group (2 ))))
47
47
return result
48
48
49
49
_line_maps = {}
You can’t perform that action at this time.
0 commit comments