Skip to content

Commit 6bd708a

Browse files
authored
Merge pull request #1 from finalfantasia/master
chore(ci): Add CI/release workflows for automatically generating WASM artifacts
2 parents e43eff8 + 9f92f69 commit 6bd708a

13 files changed

Lines changed: 13816 additions & 13755 deletions

File tree

.github/workflows/ci.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
workflow_dispatch:
9+
10+
concurrency:
11+
group: ${{github.workflow}}-${{github.ref}}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
test:
16+
name: Test parser
17+
runs-on: ${{matrix.os}}
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
os: [ubuntu-latest, windows-latest, macos-latest]
22+
steps:
23+
- name: Set up repository
24+
uses: actions/checkout@v6
25+
26+
- name: Set up tree-sitter
27+
uses: tree-sitter/setup-action@v2
28+
with:
29+
install-lib: false
30+
31+
- name: Run tests
32+
uses: tree-sitter/parser-test-action@v2
33+
34+
query:
35+
name: Validate queries
36+
runs-on: ubuntu-latest
37+
steps:
38+
- name: Set up repository
39+
uses: actions/checkout@v6
40+
41+
- name: Set up tree-sitter
42+
uses: tree-sitter/setup-action@v2
43+
with:
44+
install-lib: false
45+
46+
- name: Build parser
47+
run: tree-sitter build
48+
49+
- name: Set up ts_query_ls
50+
run: curl -fL https://github.com/ribru17/ts_query_ls/releases/latest/download/ts_query_ls-x86_64-unknown-linux-gnu.tar.gz | tar -xz
51+
52+
- name: Check queries
53+
run: ./ts_query_ls check -f queries/

.github/workflows/release.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Create release
2+
3+
on:
4+
push:
5+
tags: ["*"]
6+
workflow_dispatch:
7+
8+
concurrency:
9+
group: ${{github.workflow}}-${{github.ref}}
10+
cancel-in-progress: true
11+
12+
permissions:
13+
contents: write
14+
id-token: write
15+
attestations: write
16+
17+
jobs:
18+
release:
19+
uses: tree-sitter/workflows/.github/workflows/release.yml@main

.tsqueryrc.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/ribru17/ts_query_ls/refs/heads/master/schemas/config.json",
3+
"parser_install_directories": [
4+
"."
5+
]
6+
}

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ Bits may be missing and/or inaccurate :)
88
* Decide about inline use (e.g. add some \_bare\_\* constructs? stop using?)
99
([#41](https://github.com/sogaiu/tree-sitter-clojure/issues/41))
1010

11+
### v0.0.14 - 2026-02-17
12+
13+
* Features and Fixes
14+
* Add GitHub Actions workflows
15+
* Update version info in package.json and tree-sitter.json
16+
* Generate parser.c and friends with tree-sitter v0.26.5 (ABI version 15)
17+
1118
### v0.0.13 - 2024-05-15
1219

1320
* Features and Fixes

package.json

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,38 @@
11
{
22
"name": "tree-sitter-clojure",
3-
"version": "0.0.13",
3+
"version": "0.0.14",
44
"description": "Clojure grammar for tree-sitter",
5+
"repository": "https://github.com/anomalyco/tree-sitter-clojure",
6+
"license": "CC0-1.0",
7+
"author": "sogaiu",
8+
"keywords": [
9+
"incremental",
10+
"parsing",
11+
"tree-sitter",
12+
"clojure",
13+
"edn"
14+
],
15+
"files": [
16+
"grammar.js",
17+
"tree-sitter.json",
18+
"queries/*",
19+
"src/**",
20+
"*.wasm"
21+
],
22+
"scripts": {
23+
"prestart": "tree-sitter build --wasm",
24+
"start": "tree-sitter playground",
25+
"test": "tree-sitter test"
26+
},
527
"tree-sitter": [
628
{
729
"scope": "source.clojure",
830
"file-types": [
931
"bb",
1032
"clj",
1133
"cljc",
12-
"cljs"
34+
"cljs",
35+
"edn"
1336
]
1437
}
1538
]

queries/highlights.scm

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
;; Literals
2-
1+
; Literals
32
(num_lit) @number
43

54
[
@@ -8,22 +7,20 @@
87
] @string
98

109
[
11-
(bool_lit)
12-
(nil_lit)
10+
(bool_lit)
11+
(nil_lit)
1312
] @constant.builtin
1413

1514
(kwd_lit) @constant
1615

17-
;; Comments
18-
16+
; Comments
1917
(comment) @comment
2018

21-
;; Treat quasiquotation as operators for the purpose of highlighting.
22-
19+
; Treat quasiquotation as operators for the purpose of highlighting.
2320
[
24-
"'"
25-
"`"
26-
"~"
27-
"@"
28-
"~@"
21+
"'"
22+
"`"
23+
"~"
24+
"@"
25+
"~@"
2926
] @operator

src/grammar.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "https://tree-sitter.github.io/tree-sitter/assets/schemas/grammar.schema.json",
23
"name": "clojure",
34
"rules": {
45
"source": {
@@ -1934,6 +1935,6 @@
19341935
"_sym_qualified",
19351936
"_sym_unqualified"
19361937
],
1937-
"supertypes": []
1938-
}
1939-
1938+
"supertypes": [],
1939+
"reserved": {}
1940+
}

src/node-types.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1911,6 +1911,7 @@
19111911
{
19121912
"type": "source",
19131913
"named": true,
1914+
"root": true,
19141915
"fields": {},
19151916
"children": {
19161917
"multiple": true,

0 commit comments

Comments
 (0)