Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,7 @@ indent_size = 2

[{alloc,array,parser}.h]
indent_size = 2

[test/**.txt]
indent_size = 2
indent_style = space
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ jobs:
os: [ubuntu-latest, windows-2022, macos-latest]
steps:
- name: Checkout repository
uses: actions/checkout@v6
uses: actions/checkout@v7

- name: Set up tree-sitter
uses: tree-sitter/setup-action/cli@v2
with:
tree-sitter-ref: v0.26.10
tree-sitter-ref: v0.26.11

- name: Run tests
uses: tree-sitter/parser-test-action@v3
Expand All @@ -34,7 +34,7 @@ jobs:
test-python: true
test-go: true

- name: Run test wild
- name: Run tests wild
if: runner.os != 'Windows'
continue-on-error: true
run: node scripts/test_wild.mjs
13 changes: 5 additions & 8 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v7

- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version-file: .nvmrc

# Instruct a C++ compiler to use the C++20 standard
# Required to install tree-sitter dev dependencie
# See # https://github.com/tree-sitter/node-tree-sitter/issues/268
- name: Install dependencies
run: CXXFLAGS="-std=c++20" npm ci
run: npm ci

- name: Build WASM
run: npx tree-sitter build --wasm
Expand All @@ -43,10 +40,10 @@ jobs:
sed -i 's|LANGUAGE_BASE_URL = ""|LANGUAGE_BASE_URL = "/tree-sitter-rescript"|' ./public/index.html

- name: Setup Pages
uses: actions/configure-pages@v5
uses: actions/configure-pages@v6

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
uses: actions/upload-pages-artifact@v5
with:
path: ./public

Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Lint

on:
push:
branches: [main]
paths:
- grammar.js
pull_request:
paths:
- grammar.js

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version-file: .nvmrc
- name: Install modules
run: npm ci
- name: Run ESLint
run: npm run lint
- name: Checkformat
run: npm run checkformat
- name: Generate parser
run: npm run generate
- name: Check for diffs in parse files
run: git diff --exit-code
3 changes: 2 additions & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
v24.11.1
# Using v22 due https://github.com/tree-sitter/node-tree-sitter/issues/268
v22
5 changes: 5 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import treesitter from 'eslint-config-treesitter';

export default [
...treesitter,
];
Loading
Loading