mirror of
https://github.com/erg-lang/erg.git
synced 2025-08-04 10:49:54 +00:00
Fix semantic tokens
This commit is contained in:
parent
e01524e1fe
commit
3c3e1c448a
4 changed files with 95 additions and 34 deletions
|
@ -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)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue