mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-01 03:03:40 +00:00
Merge #4675
4675: Small refactor r=kiljacken a=Veetaha Co-authored-by: veetaha <veetaha2@gmail.com>
This commit is contained in:
commit
7ae247f03c
@ -48,11 +48,11 @@ impl SyntaxTreeBuilder {
|
||||
|
||||
pub fn finish(self) -> Parse<SyntaxNode> {
|
||||
let (green, errors) = self.finish_raw();
|
||||
let node = SyntaxNode::new_root(green);
|
||||
if cfg!(debug_assertions) {
|
||||
let node = SyntaxNode::new_root(green.clone());
|
||||
crate::validation::validate_block_structure(&node);
|
||||
}
|
||||
Parse::new(node.green().clone(), errors)
|
||||
Parse::new(green, errors)
|
||||
}
|
||||
|
||||
pub fn token(&mut self, kind: SyntaxKind, text: SmolStr) {
|
||||
|
Loading…
Reference in New Issue
Block a user