mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
migrate ra_syntax to the new rowan API
This commit is contained in:
parent
58d4983ba5
commit
d402974aa0
20 changed files with 1189 additions and 2352 deletions
|
@ -19,13 +19,13 @@ pub(crate) fn validate(file: &SourceFile) -> Vec<SyntaxError> {
|
|||
.visit::<ast::Literal, _>(validate_literal)
|
||||
.visit::<ast::Block, _>(block::validate_block_node)
|
||||
.visit::<ast::FieldExpr, _>(field_expr::validate_field_expr_node)
|
||||
.accept(node);
|
||||
.accept(&node);
|
||||
}
|
||||
errors
|
||||
}
|
||||
|
||||
// FIXME: kill duplication
|
||||
fn validate_literal(literal: &ast::Literal, acc: &mut Vec<SyntaxError>) {
|
||||
fn validate_literal(literal: ast::Literal, acc: &mut Vec<SyntaxError>) {
|
||||
let token = literal.token();
|
||||
let text = token.text().as_str();
|
||||
match token.kind() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue