From a3e5663ae0206270156fbeb926a174a40abbddb0 Mon Sep 17 00:00:00 2001 From: Veetaha Date: Sat, 1 Feb 2020 22:25:01 +0200 Subject: ra_syntax: added tests for tokenization errors --- crates/ra_syntax/src/validation.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'crates/ra_syntax/src/validation.rs') diff --git a/crates/ra_syntax/src/validation.rs b/crates/ra_syntax/src/validation.rs index 445e3b3e4..8a5f0e4b7 100644 --- a/crates/ra_syntax/src/validation.rs +++ b/crates/ra_syntax/src/validation.rs @@ -94,6 +94,12 @@ impl From for SyntaxErrorKind { } pub(crate) fn validate(root: &SyntaxNode) -> Vec { + // 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! { -- cgit v1.2.3