1
Fork 0

Address review comments

This commit is contained in:
León Orell Valerian Liehr 2024-11-10 17:51:37 +01:00
parent 1d78004575
commit acf6344b42
No known key found for this signature in database
GPG key ID: D17A07215F68E713
3 changed files with 44 additions and 41 deletions

View file

@ -2223,6 +2223,10 @@ pub fn char_width(ch: char) -> usize {
}
}
pub fn str_width(s: &str) -> usize {
s.chars().map(char_width).sum()
}
/// Normalizes the source code and records the normalizations.
fn normalize_src(src: &mut String) -> Vec<NormalizedPos> {
let mut normalized_pos = vec![];