Fix: mappings

This commit is contained in:
2026-05-19 09:46:24 +02:00
parent 69e5ab2a5e
commit 3620f0432a
3 changed files with 4 additions and 16 deletions
+1 -3
View File
@@ -2,9 +2,7 @@ WHITESPACE = _{ " " | "\t" | "\r" | "\n" }
integer = @{ ASCII_DIGIT+ }
next_line = { "+" }
map = { "/*" ~ integer ~ ":" ~ integer ~ next_line? ~ "*/" }
map = { "/*" ~ integer ~ ":" ~ integer ~ "*/" }
non_map = { (!map ~ ANY)+ }
+1 -11
View File
@@ -32,17 +32,7 @@ pub fn get_mapping(input: &str) -> HashSet<(RustMap, MistMap)> {
inner.next().unwrap().as_str().parse().unwrap(),
);
mapping.insert((
RustMap(rs.0, rs.1),
MistMap(
if inner.next().is_some() {
line
} else {
line - 1
},
col,
),
));
mapping.insert((RustMap(rs.0, rs.1), MistMap(line, col)));
}
}