Follow naming convention

This commit is contained in:
Johannes Altmanninger 2024-09-28 13:22:27 +02:00
parent d00e900e5a
commit 50314e309b

View file

@ -568,26 +568,26 @@ impl<'c> Tokenizer<'c> {
let mut is_token_begin = true; let mut is_token_begin = true;
fn process_opening_quote( fn process_opening_quote(
this: &mut Tokenizer, zelf: &mut Tokenizer,
quoted_cmdsubs: &mut Vec<usize>, quoted_cmdsubs: &mut Vec<usize>,
paran_offsets: &[usize], paran_offsets: &[usize],
quote: char, quote: char,
) -> Result<(), usize> { ) -> Result<(), usize> {
this.on_quote_toggle zelf.on_quote_toggle
.as_mut() .as_mut()
.map(|cb| (cb)(this.token_cursor)); .map(|cb| (cb)(zelf.token_cursor));
if let Some(end) = quote_end(this.start, this.token_cursor, quote) { if let Some(end) = quote_end(zelf.start, zelf.token_cursor, quote) {
let mut one_past_end = end + 1; let mut one_past_end = end + 1;
if this.start.char_at(end) == '$' { if zelf.start.char_at(end) == '$' {
one_past_end = end; one_past_end = end;
quoted_cmdsubs.push(paran_offsets.len()); quoted_cmdsubs.push(paran_offsets.len());
} }
this.token_cursor = end; zelf.token_cursor = end;
this.on_quote_toggle.as_mut().map(|cb| (cb)(one_past_end)); zelf.on_quote_toggle.as_mut().map(|cb| (cb)(one_past_end));
Ok(()) Ok(())
} else { } else {
let error_loc = this.token_cursor; let error_loc = zelf.token_cursor;
this.token_cursor = this.start.len(); zelf.token_cursor = zelf.start.len();
Err(error_loc) Err(error_loc)
} }
} }