Skip to content

Commit 83e2649

Browse files
authored
chore: adjust Neovim queries (#42)
* chore: adjust Neovim queries * fix: proper return index integers in asm arrangements * chore: version bump to 1.5.2 * feat(ci): run the built-in fuzzer added in tree-sitter-cli 0.23.0 * fix: simplify the query * chore(CI): pin the tree-sitter version This prevents sudden breaks of CI due to changes in the config format or other breaking changes from upstream * chore(CI): pin Node.js version too * fix: wrong dependency version
1 parent 09c57b6 commit 83e2649

File tree

13 files changed

+3843
-3773
lines changed

13 files changed

+3843
-3773
lines changed

.github/workflows/ci.yml

+7
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,24 @@ jobs:
2525
steps:
2626
- uses: actions/checkout@v4
2727
- uses: tree-sitter/setup-action/cli@v1
28+
with:
29+
tree-sitter-ref: "v0.23.2"
2830
- uses: tree-sitter/parser-test-action@v2
2931
with:
3032
generate: true
3133
test-parser: true
3234
# test-parser-cmd: tree-sitter test # default
3335
test-rust: ${{runner.os != 'Windows'}}
3436
test-node: ${{runner.os != 'Windows'}}
37+
node-version: "22.8.0"
3538
test-python: false # default
3639
test-go: false # default
3740
test-swift: false # default
3841

42+
- name: Run built-in Tree-sitter fuzzer
43+
run:
44+
npm run ts -- fuzz --edits 500000 --iterations 10000
45+
3946
- name: Check correspondence to Ohm parser
4047
if: ${{ runner.os != 'Windows' }}
4148
run: |

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "tree-sitter-tact"
33
description = "Tact grammar for the tree-sitter"
4-
version = "1.5.1"
4+
version = "1.5.2"
55
authors = ["Novus Nota (https://github.com/novusnota)"]
66
license = "MIT"
77
keywords = ["incremental", "parsing", "tree-sitter", "tact"]

Makefile

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

editor_queries/neovim/highlights.scm

+1-3
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,7 @@
9696

9797
(tlb_serialization
9898
"as" @keyword
99-
type: (identifier) @type.builtin
100-
(#match? @type.builtin
101-
"^(coins|remaining|bytes32|bytes64|int257|u?int(?:2[0-5][0-6]|1[0-9][0-9]|[1-9][0-9]?))$"))
99+
type: (identifier) @type.builtin)
102100

103101
; string
104102
; ------

grammar.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -873,7 +873,13 @@ module.exports = grammar({
873873
},
874874

875875
// Used in arrangements of arguments to return values in asm functions
876-
_decimal_integer: (_) => /\d+/,
876+
_decimal_integer: (_) => {
877+
const dec_digits = /(?:_?\d)*/;
878+
const dec_literal = seq(/[1-9]/, optional(dec_digits));
879+
const dec_leading_zero_literal = seq(/\d/, optional(dec_digits));
880+
881+
return token(choice(dec_literal, dec_leading_zero_literal));
882+
},
877883

878884
/* Comments */
879885

package-lock.json

+5-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tree-sitter-tact",
3-
"version": "1.5.1",
3+
"version": "1.5.2",
44
"description": "A tree-sitter grammar for the Tact programming language",
55
"author": "Novus Nota (https://github.com/novusnota)",
66
"license": "MIT",

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
55
[project]
66
name = "tree-sitter-tact"
77
description = "Tact grammar for tree-sitter"
8-
version = "1.5.1"
8+
version = "1.5.2"
99
keywords = ["incremental", "parsing", "tree-sitter", "tact"]
1010
classifiers = [
1111
"Intended Audience :: Developers",

src/grammar.json

+48-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)