mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
internal: remove accidental code re-use
FragmentKind played two roles: * entry point to the parser * syntactic category of a macro call These are different use-cases, and warrant different types. For example, macro can't expand to visibility, but we have such fragment today. This PR introduces `ExpandsTo` enum to separate this two use-cases. I suspect we might further split `FragmentKind` into `$x:specifier` enum specific to MBE, and a general parser entry point, but that's for another PR!
This commit is contained in:
parent
847d0faf92
commit
dbb702cfc1
18 changed files with 168 additions and 135 deletions
|
@ -3,10 +3,11 @@ mod rule;
|
|||
|
||||
use std::fmt::Write;
|
||||
|
||||
use ::parser::FragmentKind;
|
||||
use syntax::{ast, AstNode, NodeOrToken, SyntaxNode, WalkEvent};
|
||||
use test_utils::assert_eq_text;
|
||||
|
||||
use crate::FragmentKind;
|
||||
|
||||
use super::*;
|
||||
|
||||
pub(crate) struct MacroFixture {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue