Skip to content

release v0.4.0 #55

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 17, 2025
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
34 changes: 11 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,8 @@ name: CI
on:
push:
branches: [main]
paths:
- grammar.js
- src/**
- test/**
- bindings/**
- binding.gyp
pull_request:
paths:
- grammar.js
- src/**
- test/**
- bindings/**
- binding.gyp
workflow_dispatch:

concurrency:
group: ${{github.workflow}}-${{github.ref}}
Expand All @@ -28,20 +17,19 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-14]
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install tree-sitter CLI
uses: tree-sitter/setup-action/cli@v1

- name: Set up tree-sitter
uses: tree-sitter/setup-action@v2
with:
install-lib: false

- name: Run tests
uses: tree-sitter/parser-test-action@v2
with:
test-rust: ${{runner.os == 'Linux'}}
test-node: true
test-python: true
test-go: true
test-swift: ${{runner.os == 'macOS'}}

- name: Clone apisix corpus
uses: actions/checkout@v4
with:
Expand All @@ -59,6 +47,7 @@ jobs:
with:
path: examples/lua
repository: lua/lua
ref: e05590591410a5e007a1e3f1691f6c1cf9d8fe45
sparse-checkout: testes/
- name: Clone luvit corpus
uses: actions/checkout@v4
Expand All @@ -81,6 +70,7 @@ jobs:
with:
path: examples/xmake
repository: xmake-io/xmake

- name: Parse examples
uses: tree-sitter/parse-action@v4
with:
Expand All @@ -97,8 +87,6 @@ jobs:
!examples/lua/testes/db.lua
invalid-files: |-
examples/neovim/test/functional/fixtures/lua/syntax_error.lua
# FIXME: neovim/neovim#30882
examples/neovim/runtime/lua/vim/_meta/vimfn.lua

fuzz:
runs-on: ubuntu-latest
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Create release

on:
push:
tags: ["*"]
workflow_dispatch:

concurrency:
group: ${{github.workflow}}-${{github.ref}}
cancel-in-progress: true

permissions:
contents: write
id-token: write
attestations: write

jobs:
release:
uses: tree-sitter/workflows/.github/workflows/release.yml@main
with:
attestations: true

2 changes: 1 addition & 1 deletion CMakeLists.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 13 additions & 13 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Makefile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 10 additions & 1 deletion grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,16 @@ module.exports = grammar({
number_literal(hex_digits, 'p', decimal_digits)
);

return token(choice(decimal_literal, hex_literal));
const bin_digits = /[01]+/;
const bin_literal = seq(
choice('0b', '0B'),
choice(
seq(bin_digits, /U?LL/i),
seq(bin_digits, optional(choice('i', 'I')))
)
);

return token(choice(decimal_literal, hex_literal, bin_literal));
},

// LiteralString
Expand Down
33 changes: 10 additions & 23 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

67 changes: 67 additions & 0 deletions src/grammar.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading