Skip to content

Commit

Permalink
Treat regex literals as atoms in Clojure
Browse files Browse the repository at this point in the history
  • Loading branch information
Wilfred committed Dec 17, 2023
1 parent 89c7e6f commit 26c58a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

Added support for Salesforce Apex.

Improved parsing of regex literals in Clojure.

### Display

Fixed a rare crash when the last non-blank line had changes for
Expand Down
2 changes: 1 addition & 1 deletion src/parse/tree_sitter_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ pub(crate) fn from_language(language: guess::Language) -> TreeSitterConfig {
let language = unsafe { tree_sitter_clojure() };
TreeSitterConfig {
language,
atom_nodes: vec!["kwd_lit"].into_iter().collect(),
atom_nodes: vec!["kwd_lit", "regex_lit"].into_iter().collect(),
delimiter_tokens: vec![("{", "}"), ("(", ")"), ("[", "]")]
.into_iter()
.collect(),
Expand Down

0 comments on commit 26c58a2

Please sign in to comment.