Lines Matching refs:read
22 let mut read = fmt.as_str(); in expand_shorthand() localVariable
35 while let Some(brace) = read.find('{') { in expand_shorthand()
36 out += &read[..brace + 1]; in expand_shorthand()
37 read = &read[brace + 1..]; in expand_shorthand()
38 if read.starts_with('{') { in expand_shorthand()
40 read = &read[1..]; in expand_shorthand()
43 let next = match read.chars().next() { in expand_shorthand()
49 let int = take_int(&mut read); in expand_shorthand()
61 let mut ident = take_ident(&mut read); in expand_shorthand()
68 let end_spec = match read.find('}') { in expand_shorthand()
72 let bound = match read[..end_spec].chars().next_back() { in expand_shorthand()
107 if read.starts_with('}') && member_index.contains_key(&member) { in expand_shorthand()
114 out += read; in expand_shorthand()
139 fn take_int(read: &mut &str) -> String { in take_int()
141 for (i, ch) in read.char_indices() { in take_int()
145 *read = &read[i..]; in take_int()
153 fn take_ident(read: &mut &str) -> Ident { in take_ident()
155 let raw = read.starts_with("r#"); in take_ident()
158 *read = &read[2..]; in take_ident()
160 for (i, ch) in read.char_indices() { in take_ident()
164 *read = &read[i..]; in take_ident()