mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
ra_syntax: added tests for tokenization errors
This commit is contained in:
parent
9367b9a292
commit
a3e5663ae0
150 changed files with 427 additions and 49 deletions
|
@ -94,6 +94,12 @@ impl From<rustc_lexer::unescape::EscapeError> for SyntaxErrorKind {
|
|||
}
|
||||
|
||||
pub(crate) fn validate(root: &SyntaxNode) -> Vec<SyntaxError> {
|
||||
// FIXME:
|
||||
// * Add validation of character literal containing only a single char
|
||||
// * Add validation of `crate` keyword not appearing in the middle of the symbol path
|
||||
// * Add validation of doc comments are being attached to nodes
|
||||
// * Remove validation of unterminated literals (it is already implemented in `tokenize()`)
|
||||
|
||||
let mut errors = Vec::new();
|
||||
for node in root.descendants() {
|
||||
match_ast! {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue