Treat shebangs in dart as atoms

E.g. given:

    #! /usr/bin/env dshell

tree-sitter AST doesn't have positions for the `/usr/bin/env dshell`
part, so treat it all as an atom.
pull/185/head
Wilfred Hughes 2022-03-23 22:13:45 +07:00
parent f15ec6d637
commit 886c0964ff
1 changed files with 1 additions and 1 deletions

@ -200,7 +200,7 @@ pub fn from_language(language: guess::Language) -> TreeSitterConfig {
TreeSitterConfig {
name: "Dart",
language,
atom_nodes: (vec!["string_literal"]).into_iter().collect(),
atom_nodes: (vec!["string_literal", "script_tag"]).into_iter().collect(),
delimiter_tokens: (vec![("{", "}"), ("(", ")"), ("[", "]"), ("<", ">")]),
highlight_query: ts::Query::new(
language,