Fix semantic tokens

This commit is contained in:
Shunsuke Shibayama 2023-01-17 03:05:42 +09:00
parent e01524e1fe
commit 3c3e1c448a
4 changed files with 95 additions and 34 deletions

View file

@ -322,6 +322,15 @@ impl Location {
_ => None,
}
}
pub const fn length(&self) -> Option<u32> {
match self {
Self::Range {
col_begin, col_end, ..
} => Some(*col_end - *col_begin),
_ => None,
}
}
}
#[allow(clippy::too_many_arguments)]