anchor.diff:    '';
   
     # update one tree-sitter grammar repo and print their nix-prefetch-git output
  -  updateGrammar = { owner, repo }: writeShellScript "update-grammar.sh" ''
  +  updateGrammar = { orga, repo }: writeShellScript "update-grammar.sh" ''
       set -euo pipefail
  -    latest="$(${latestGithubRelease { inherit owner repo; }})"
  +    latest="$(${latestGithubRelease { inherit orga repo; }})"
       echo "Fetching latest release ($latest) of ${repo} …" >&2
       ${nix-prefetch-git}/bin/nix-prefetch-git \
         --quiet \
         --no-deepClone \
  -      --url "https://github.com/${urlEscape owner}/${urlEscape repo}" \
  +      --url "https://github.com/${urlEscape orga}/${urlEscape repo}" \
         --rev "$latest"
       '';
   
  -  foreachSh = list: f: lib.concatMapStringsSep "\n" f list;
  +  foreachSh = attrs: f:
  +    lib.concatMapStringsSep "\n" f
  +    (lib.mapAttrsToList (k: v: { name = k; } // v) attrs);
   
     update-all-grammars = writeShellScript "update-all-grammars.sh" ''
       set -euo pipefail
  
positive.code:   ];
    ignoredTreeSitterOrgReposJson = jsonFile "ignored-tree-sitter-org-repos" ignoredTreeSitterOrgRepos;
  
    jsonFile = name: val: (formats.json {}).generate name val;
  
    # check the tree-sitter orga repos
  
negative.code:     outputDir="${toString ./.}/grammars"
      echo "writing files to $outputDir" 1>&2
      mkdir -p "$outputDir"
      ${foreachSh allGrammars
        ({name, orga, repo}: ''${updateGrammar { inherit orga repo; }} > $outputDir/${name}.json'')}
      ( echo "{"
        ${foreachSh allGrammars
          ({name, ...}: ''
             # indentation hack
               printf "  %s = (builtins.fromJSON (builtins.readFile ./%s.json));\n" "${name}" "${name}"'')}
        echo "}" ) \
        > "$outputDir/default.nix"
    '';
  