@@ -354,3 +354,33 @@ This package includes the @command{tree-sitter} command-line tool.")
(description
"This package provides a Java grammar for the Tree-sitter library.")
(license license:expat)))
+
+(define-public tree-sitter-javascript
+ (package (inherit tree-sitter-c)
+ (name "tree-sitter-javascript")
+ (version "0.19.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/tree-sitter/tree-sitter-javascript")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "063va0s727yzhy1cz04fipzwwbq4af6fhgka6g970hk9yf7ggmnj"))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments tree-sitter-c)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ ;; The parse-example script tries to clone git repositories.
+ (add-after 'unpack 'remove-parse-example
+ (lambda _
+ (substitute* "package.json"
+ ((" && script\\/parse-examples") ""))))))))
+ (home-page "https://github.com/tree-sitter/tree-sitter-javascript")
+ (synopsis "Tree-sitter Javascript grammar")
+ (description
+ "This package provides a Javascript grammar for the Tree-sitter
+library.")
+ (license license:expat)))