mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-03 09:07:26 +00:00
ra_syntax: refactored the lexer design as per @matklad and @kiljacken PR review
This commit is contained in:
parent
bf60661aa3
commit
9e7eaa959f
9 changed files with 202 additions and 181 deletions
|
@ -44,12 +44,6 @@ pub struct SyntaxTreeBuilder {
|
|||
inner: GreenNodeBuilder<'static>,
|
||||
}
|
||||
|
||||
impl SyntaxTreeBuilder {
|
||||
pub fn new(errors: Vec<SyntaxError>) -> Self {
|
||||
Self { errors, inner: GreenNodeBuilder::default() }
|
||||
}
|
||||
}
|
||||
|
||||
impl SyntaxTreeBuilder {
|
||||
pub(crate) fn finish_raw(self) -> (GreenNode, Vec<SyntaxError>) {
|
||||
let green = self.inner.finish();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue