Convert span's start to line number + col
This requires to make line numbers a first-class citizen in the module hierarchy but it is fortunately not _too involved_.
This commit is contained in:
@@ -19,5 +19,17 @@ Module {
|
||||
},
|
||||
),
|
||||
],
|
||||
lines: LineNumbers {
|
||||
line_starts: [
|
||||
0,
|
||||
10,
|
||||
11,
|
||||
27,
|
||||
],
|
||||
length: 43,
|
||||
last: Some(
|
||||
27,
|
||||
),
|
||||
},
|
||||
kind: Validator,
|
||||
}
|
||||
|
||||
@@ -197,5 +197,32 @@ Module {
|
||||
},
|
||||
),
|
||||
],
|
||||
lines: LineNumbers {
|
||||
line_starts: [
|
||||
0,
|
||||
13,
|
||||
27,
|
||||
34,
|
||||
36,
|
||||
37,
|
||||
50,
|
||||
64,
|
||||
71,
|
||||
73,
|
||||
74,
|
||||
87,
|
||||
104,
|
||||
106,
|
||||
107,
|
||||
120,
|
||||
138,
|
||||
154,
|
||||
156,
|
||||
],
|
||||
length: 156,
|
||||
last: Some(
|
||||
156,
|
||||
),
|
||||
},
|
||||
kind: Validator,
|
||||
}
|
||||
|
||||
@@ -48,5 +48,18 @@ Module {
|
||||
},
|
||||
),
|
||||
],
|
||||
lines: LineNumbers {
|
||||
line_starts: [
|
||||
0,
|
||||
11,
|
||||
27,
|
||||
31,
|
||||
33,
|
||||
],
|
||||
length: 33,
|
||||
last: Some(
|
||||
33,
|
||||
),
|
||||
},
|
||||
kind: Validator,
|
||||
}
|
||||
|
||||
@@ -46,5 +46,18 @@ Module {
|
||||
},
|
||||
),
|
||||
],
|
||||
lines: LineNumbers {
|
||||
line_starts: [
|
||||
0,
|
||||
11,
|
||||
25,
|
||||
29,
|
||||
31,
|
||||
],
|
||||
length: 31,
|
||||
last: Some(
|
||||
31,
|
||||
),
|
||||
},
|
||||
kind: Validator,
|
||||
}
|
||||
|
||||
@@ -20,5 +20,15 @@ Module {
|
||||
},
|
||||
),
|
||||
],
|
||||
lines: LineNumbers {
|
||||
line_starts: [
|
||||
0,
|
||||
16,
|
||||
],
|
||||
length: 16,
|
||||
last: Some(
|
||||
16,
|
||||
),
|
||||
},
|
||||
kind: Validator,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user