Merge #1138
1138: Add L_DOLLAR and R_DOLLAR r=matklad a=edwin0cheng As discussion in issue https://github.com/rust-analyzer/rust-analyzer/issues/1132 and PR #1125 , this PR add 2 `Syntax::Kind` : `L_DOLLAR` and `R_DOLLAR` for representing `Delimiter::None` in mbe and proc_marco. By design, It should not affect the final syntax tree, and will be discard in `TreeSink`. My original idea is handling these 2 tokens case by case, but i found that they will appear in every place in the parser (imagine `tt` matcher). So this PR only handle it in `Parser::do_bump` and `Parser::start`, although It will not fix the `expr` matcher executing order problem in original idea. Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
This commit is contained in:
@@ -118,6 +118,8 @@ Grammar(
|
||||
"LIFETIME",
|
||||
"COMMENT",
|
||||
"SHEBANG",
|
||||
"L_DOLLAR",
|
||||
"R_DOLLAR",
|
||||
],
|
||||
nodes: [
|
||||
"SOURCE_FILE",
|
||||
|
||||
Reference in New Issue
Block a user