mirror of
https://codeberg.org/guix/guix.git
synced 2026-01-25 03:55:08 -06:00
gnu: tree-sitter-starlark: Adjust to new tree-sitter-python.
* gnu/packages/tree-sitter.scm (tree-sitter-starlark): Adjust grammar to changes made in dependency (tree-sitter-python). tree-sitter-starlark inherits tree-sitter-python, so a change made there broke generation of Starlark's grammar. This patch applies the minimal change necessary until the issue is fixed upstream [1]. [1] https://github.com/tree-sitter-grammars/tree-sitter-starlark/issues/9 Change-Id: Ie999f1506947f17a3b26209ae12046597fc5dc44 Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
This commit is contained in:
parent
9fd02d856c
commit
15293e03db
1 changed files with 22 additions and 1 deletions
|
|
@ -1313,7 +1313,28 @@ which will be used as a snippet in origin."
|
|||
"1qlvk67fqd49138nxl81l4gx833271mns36g3lm884sdmw3225w8"
|
||||
"1.3.0"
|
||||
#:repository-url "https://github.com/tree-sitter-grammars/tree-sitter-starlark"
|
||||
#:inputs (list tree-sitter-python)))
|
||||
#:inputs (list tree-sitter-python)
|
||||
#:get-cleanup-snippet
|
||||
(lambda (grammar-directories)
|
||||
#~(begin
|
||||
(use-modules (guix build utils))
|
||||
;; FIXME: This grammar was built with tree-sitter-python@0.23.5.
|
||||
;; https://github.com/tree-sitter-grammars/tree-sitter-starlark/issues/9
|
||||
(substitute* "grammar.js"
|
||||
(("rules: \\{" rules)
|
||||
"\
|
||||
reserved: {global: _ => [],},
|
||||
supertypes: $ => [
|
||||
$._simple_statement,
|
||||
$._compound_statement,
|
||||
$.expression,
|
||||
$.primary_expression,
|
||||
$.pattern,
|
||||
$.parameter,
|
||||
],
|
||||
rules: {
|
||||
"))
|
||||
#$(tree-sitter-delete-generated-files grammar-directories)))))
|
||||
|
||||
(define-public tree-sitter-sway
|
||||
(let ((commit "f9e53e922496dd47208a141fa7ac315625a1874f")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue