aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_mbe/src/subtree_source.rs
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-04-21 11:34:07 +0100
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-04-21 11:34:07 +0100
commitfa15c4d75e87bd3bf761c91f030c76aec59308ae (patch)
treeba7a3495b13e41231076d5a0e491132bbdb0670e /crates/ra_mbe/src/subtree_source.rs
parent493bf20b3d1a0a890514d5252901f13d2878ff34 (diff)
parent9e35bf91b827900b089a7ea937cb73707bebc420 (diff)
Merge #1175
1175: Fix bugs and add error log about macro expansion r=matklad a=edwin0cheng This PR fixed / add following things: * Add a fused count which stop recursion of macro expansion in name resolution. * Add some logs when macro expansion fails * Add `$crate` meta variable support in mbe, which create a `$crate` ident token in token tree. * Fixed matching a `$REPEAT` pattern inside a subtree, e.g. `(fn $name:ident {$($i:ident)*} ) => {...}` * Remove composite-able punct token in syntax node to token conversion. Co-authored-by: Edwin Cheng <[email protected]>
Diffstat (limited to 'crates/ra_mbe/src/subtree_source.rs')
-rw-r--r--crates/ra_mbe/src/subtree_source.rs19
1 files changed, 0 insertions, 19 deletions
diff --git a/crates/ra_mbe/src/subtree_source.rs b/crates/ra_mbe/src/subtree_source.rs
index 0a070b46a..16a053b49 100644
--- a/crates/ra_mbe/src/subtree_source.rs
+++ b/crates/ra_mbe/src/subtree_source.rs
@@ -379,8 +379,6 @@ where
379{ 379{
380 if let Some((m, is_joint_to_next)) = iter.current_punct3(p) { 380 if let Some((m, is_joint_to_next)) = iter.current_punct3(p) {
381 if let Some((kind, text)) = match m { 381 if let Some((kind, text)) = match m {
382 ('<', '<', '=') => Some((SHLEQ, "<<=")),
383 ('>', '>', '=') => Some((SHREQ, ">>=")),
384 ('.', '.', '.') => Some((DOTDOTDOT, "...")), 382 ('.', '.', '.') => Some((DOTDOTDOT, "...")),
385 ('.', '.', '=') => Some((DOTDOTEQ, "..=")), 383 ('.', '.', '=') => Some((DOTDOTEQ, "..=")),
386 _ => None, 384 _ => None,
@@ -391,23 +389,6 @@ where
391 389
392 if let Some((m, is_joint_to_next)) = iter.current_punct2(p) { 390 if let Some((m, is_joint_to_next)) = iter.current_punct2(p) {
393 if let Some((kind, text)) = match m { 391 if let Some((kind, text)) = match m {
394 ('<', '<') => Some((SHL, "<<")),
395 ('>', '>') => Some((SHR, ">>")),
396
397 ('|', '|') => Some((PIPEPIPE, "||")),
398 ('&', '&') => Some((AMPAMP, "&&")),
399 ('%', '=') => Some((PERCENTEQ, "%=")),
400 ('*', '=') => Some((STAREQ, "*=")),
401 ('/', '=') => Some((SLASHEQ, "/=")),
402 ('^', '=') => Some((CARETEQ, "^=")),
403
404 ('&', '=') => Some((AMPEQ, "&=")),
405 ('|', '=') => Some((PIPEEQ, "|=")),
406 ('-', '=') => Some((MINUSEQ, "-=")),
407 ('+', '=') => Some((PLUSEQ, "+=")),
408 ('>', '=') => Some((GTEQ, ">=")),
409 ('<', '=') => Some((LTEQ, "<=")),
410
411 ('-', '>') => Some((THIN_ARROW, "->")), 392 ('-', '>') => Some((THIN_ARROW, "->")),
412 ('!', '=') => Some((NEQ, "!=")), 393 ('!', '=') => Some((NEQ, "!=")),
413 ('=', '>') => Some((FAT_ARROW, "=>")), 394 ('=', '>') => Some((FAT_ARROW, "=>")),