Skip to content

Commit

Permalink
Introduce tags.scm (tree-sitter#5)
Browse files Browse the repository at this point in the history
* Introduce tags file

* Ignore standard test file

* Remove predicates in tags

See tree-sitter/tree-sitter@ba70927

Co-authored-by: Max Brunsfeld <[email protected]>
  • Loading branch information
tclem and maxbrunsfeld authored Jul 21, 2020
1 parent 2420ec3 commit 8474d90
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
/yarn-error.log
/binding.gyp
/build
test.ql
.DS_Store
package-lock.json
Empty file added examples/.gitkeep
Empty file.
26 changes: 26 additions & 0 deletions queries/tags.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
(classlessPredicate
name: (predicateName) @name) @definition.function

(memberPredicate
name: (predicateName) @name) @definition.method

(aritylessPredicateExpr
name: (literalId) @name) @reference.call

(module
name: (moduleName) @name) @definition.module

(dataclass
name: (className) @name) @definition.class

(datatype
name: (className) @name) @definition.class

(datatypeBranch
name: (className) @name) @definition.class

(qualifiedRhs
name: (predicateName) @name) @reference.call

(typeExpr
name: (className) @name) @reference.type

0 comments on commit 8474d90

Please sign in to comment.