Skip to content

Commit

Permalink
Atomize hex and unicode string literals in Solidity
Browse files Browse the repository at this point in the history
Without this, changes inside these string types are not taken into
consideration when performing the diff.
  • Loading branch information
mateuszradomski authored and Wilfred committed Oct 2, 2024
1 parent 393845d commit 663590a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/parse/tree_sitter_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1045,7 +1045,9 @@ pub(crate) fn from_language(language: guess::Language) -> TreeSitterConfig {
let language = unsafe { tree_sitter_solidity() };
TreeSitterConfig {
language,
atom_nodes: vec!["string"].into_iter().collect(),
atom_nodes: vec!["string", "hex_string_literal", "unicode_string_literal"]
.into_iter()
.collect(),
delimiter_tokens: vec![("[", "]"), ("(", ")"), ("{", "}")],
highlight_query: ts::Query::new(
language,
Expand Down

0 comments on commit 663590a

Please sign in to comment.