diff options
Diffstat (limited to 'crates/ra_mbe')
-rw-r--r-- | crates/ra_mbe/src/syntax_bridge.rs | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/crates/ra_mbe/src/syntax_bridge.rs b/crates/ra_mbe/src/syntax_bridge.rs index b7e8d34da..257503de8 100644 --- a/crates/ra_mbe/src/syntax_bridge.rs +++ b/crates/ra_mbe/src/syntax_bridge.rs | |||
@@ -231,48 +231,48 @@ impl TtTokenSource { | |||
231 | { | 231 | { |
232 | if let Some((m, is_joint_to_next)) = iter.current_punct3(p) { | 232 | if let Some((m, is_joint_to_next)) = iter.current_punct3(p) { |
233 | if let Some((kind, text)) = match m { | 233 | if let Some((kind, text)) = match m { |
234 | ('<', '<', '=') => Some((SHLEQ, "<<=".into())), | 234 | ('<', '<', '=') => Some((SHLEQ, "<<=")), |
235 | ('>', '>', '=') => Some((SHREQ, ">>=".into())), | 235 | ('>', '>', '=') => Some((SHREQ, ">>=")), |
236 | ('.', '.', '.') => Some((DOTDOTDOT, "...".into())), | 236 | ('.', '.', '.') => Some((DOTDOTDOT, "...")), |
237 | ('.', '.', '=') => Some((DOTDOTEQ, "..=".into())), | 237 | ('.', '.', '=') => Some((DOTDOTEQ, "..=")), |
238 | _ => None, | 238 | _ => None, |
239 | } { | 239 | } { |
240 | iter.next(); | 240 | iter.next(); |
241 | iter.next(); | 241 | iter.next(); |
242 | return Some(TtToken { kind, is_joint_to_next, text }); | 242 | return Some(TtToken { kind, is_joint_to_next, text: text.into() }); |
243 | } | 243 | } |
244 | } | 244 | } |
245 | 245 | ||
246 | if let Some((m, is_joint_to_next)) = iter.current_punct2(p) { | 246 | if let Some((m, is_joint_to_next)) = iter.current_punct2(p) { |
247 | if let Some((kind, text)) = match m { | 247 | if let Some((kind, text)) = match m { |
248 | ('<', '<') => Some((SHL, "<<".into())), | 248 | ('<', '<') => Some((SHL, "<<")), |
249 | ('>', '>') => Some((SHR, ">>".into())), | 249 | ('>', '>') => Some((SHR, ">>")), |
250 | 250 | ||
251 | ('|', '|') => Some((PIPEPIPE, "||".into())), | 251 | ('|', '|') => Some((PIPEPIPE, "||")), |
252 | ('&', '&') => Some((AMPAMP, "&&".into())), | 252 | ('&', '&') => Some((AMPAMP, "&&")), |
253 | ('%', '=') => Some((PERCENTEQ, "%=".into())), | 253 | ('%', '=') => Some((PERCENTEQ, "%=")), |
254 | ('*', '=') => Some((STAREQ, "*=".into())), | 254 | ('*', '=') => Some((STAREQ, "*=")), |
255 | ('/', '=') => Some((SLASHEQ, "/=".into())), | 255 | ('/', '=') => Some((SLASHEQ, "/=")), |
256 | ('^', '=') => Some((CARETEQ, "^=".into())), | 256 | ('^', '=') => Some((CARETEQ, "^=")), |
257 | 257 | ||
258 | ('&', '=') => Some((AMPEQ, "&=".into())), | 258 | ('&', '=') => Some((AMPEQ, "&=")), |
259 | ('|', '=') => Some((PIPEEQ, "|=".into())), | 259 | ('|', '=') => Some((PIPEEQ, "|=")), |
260 | ('-', '=') => Some((MINUSEQ, "-=".into())), | 260 | ('-', '=') => Some((MINUSEQ, "-=")), |
261 | ('+', '=') => Some((PLUSEQ, "+=".into())), | 261 | ('+', '=') => Some((PLUSEQ, "+=")), |
262 | ('>', '=') => Some((GTEQ, ">=".into())), | 262 | ('>', '=') => Some((GTEQ, ">=")), |
263 | ('<', '=') => Some((LTEQ, "<=".into())), | 263 | ('<', '=') => Some((LTEQ, "<=")), |
264 | 264 | ||
265 | ('-', '>') => Some((THIN_ARROW, "->".into())), | 265 | ('-', '>') => Some((THIN_ARROW, "->")), |
266 | ('!', '=') => Some((NEQ, "!=".into())), | 266 | ('!', '=') => Some((NEQ, "!=")), |
267 | ('=', '>') => Some((FAT_ARROW, "=>".into())), | 267 | ('=', '>') => Some((FAT_ARROW, "=>")), |
268 | ('=', '=') => Some((EQEQ, "==".into())), | 268 | ('=', '=') => Some((EQEQ, "==")), |
269 | ('.', '.') => Some((DOTDOT, "..".into())), | 269 | ('.', '.') => Some((DOTDOT, "..")), |
270 | (':', ':') => Some((COLONCOLON, "::".into())), | 270 | (':', ':') => Some((COLONCOLON, "::")), |
271 | 271 | ||
272 | _ => None, | 272 | _ => None, |
273 | } { | 273 | } { |
274 | iter.next(); | 274 | iter.next(); |
275 | return Some(TtToken { kind, is_joint_to_next, text }); | 275 | return Some(TtToken { kind, is_joint_to_next, text: text.into() }); |
276 | } | 276 | } |
277 | } | 277 | } |
278 | 278 | ||