Colin 6e771f63b0 expand injection-regex to handle more cases
docs describe this as "a regex pattern that will be tested against a *language name* in order to determine whether this language should be used for a potential *language injection* site."
2023-07-04 22:10:29 +00:00
2023-07-04 21:38:19 +00:00
2023-07-04 21:38:19 +00:00
2023-07-04 08:10:05 +00:00

this will be a tree-sitter implementation for nix-shell files.

try one of the following:

  • nix build => build the parser
  • nix develop => manually/interactively generate the parser
    • tree-sitter generate

non-flake equivalents:

  • nix-build
  • nix-shell

development workflow

guide on using tree-sitter: https://tree-sitter.github.io/tree-sitter/creating-parsers

roughly:

  1. nix develop
  2. tree-sitter generate
  3. tree-sitter test

the parser is defined in grammar.js, and tests live in corpus/.

Description
parse #!/usr/bin/env nix-shell scripts with tree-sitter
Readme 62 KiB
Languages
JavaScript 30.1%
Nix 27.7%
Shell 16.2%
Scheme 12%
HTML 7.2%
Other 6.8%