Fix: mappings
This commit is contained in:
@@ -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)+ }
|
||||
|
||||
|
||||
@@ -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)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user