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:
KtorZ
2024-01-18 12:44:20 +01:00
parent e67d5863a1
commit 59c784778e
13 changed files with 165 additions and 26 deletions

View File

@@ -19,5 +19,17 @@ Module {
},
),
],
lines: LineNumbers {
line_starts: [
0,
10,
11,
27,
],
length: 43,
last: Some(
27,
),
},
kind: Validator,
}

View File

@@ -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,
}

View File

@@ -48,5 +48,18 @@ Module {
},
),
],
lines: LineNumbers {
line_starts: [
0,
11,
27,
31,
33,
],
length: 33,
last: Some(
33,
),
},
kind: Validator,
}

View File

@@ -46,5 +46,18 @@ Module {
},
),
],
lines: LineNumbers {
line_starts: [
0,
11,
25,
29,
31,
],
length: 31,
last: Some(
31,
),
},
kind: Validator,
}

View File

@@ -20,5 +20,15 @@ Module {
},
),
],
lines: LineNumbers {
line_starts: [
0,
16,
],
length: 16,
last: Some(
16,
),
},
kind: Validator,
}