Skip to content

Commit 577db4a

Browse files
committed
1 parent 45291ab commit 577db4a

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/ark/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ stdext = { path = "../stdext" }
4747
tokio = { version = "1.26.0", features = ["full"] }
4848
tower-lsp = "0.19.0"
4949
tree-sitter = "0.23.0"
50-
tree-sitter-r = { git = "https://github.com/r-lib/tree-sitter-r", rev = "f6f60a5c26a824dd5689cec4c165457259bcb614" }
50+
tree-sitter-r = { git = "https://github.com/r-lib/tree-sitter-r", rev = "a90d569e67ce17bc4c96f53e6e84a24f06de6367" }
5151
uuid = "1.3.0"
5252
url = "2.4.1"
5353
walkdir = "2"

crates/ark/src/lsp/diagnostics_syntax.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -544,4 +544,17 @@ r"--()-")--"
544544
let diagnostics = text_diagnostics(text);
545545
assert!(diagnostics.is_empty());
546546
}
547+
548+
#[test]
549+
fn test_no_syntax_diagnostic_on_null_argument_name() {
550+
// https://github.com/r-lib/tree-sitter-r/issues/164
551+
let text = r#"
552+
switch(
553+
typeof(x),
554+
NULL = ,
555+
)
556+
"#;
557+
let diagnostics = text_diagnostics(text);
558+
assert!(diagnostics.is_empty());
559+
}
547560
}

0 commit comments

Comments
 (0)