Skip to content
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

chore: adjust Neovim queries #42

Merged
merged 8 commits into from
Oct 9, 2024
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
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,24 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: tree-sitter/setup-action/cli@v1
with:
tree-sitter-ref: "v0.23.2"
- uses: tree-sitter/parser-test-action@v2
with:
generate: true
test-parser: true
# test-parser-cmd: tree-sitter test # default
test-rust: ${{runner.os != 'Windows'}}
test-node: ${{runner.os != 'Windows'}}
node-version: "22.8.0"
test-python: false # default
test-go: false # default
test-swift: false # default

- name: Run built-in Tree-sitter fuzzer
run:
npm run ts -- fuzz --edits 500000 --iterations 10000

- name: Check correspondence to Ohm parser
if: ${{ runner.os != 'Windows' }}
run: |
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "tree-sitter-tact"
description = "Tact grammar for the tree-sitter"
version = "1.5.1"
version = "1.5.2"
authors = ["Novus Nota (https://github.com/novusnota)"]
license = "MIT"
keywords = ["incremental", "parsing", "tree-sitter", "tact"]
Expand Down
2 changes: 1 addition & 1 deletion Makefile

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

4 changes: 1 addition & 3 deletions editor_queries/neovim/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,7 @@

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

; string
; ------
Expand Down
8 changes: 7 additions & 1 deletion grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,13 @@ module.exports = grammar({
},

// Used in arrangements of arguments to return values in asm functions
_decimal_integer: (_) => /\d+/,
_decimal_integer: (_) => {
const dec_digits = /(?:_?\d)*/;
const dec_literal = seq(/[1-9]/, optional(dec_digits));
const dec_leading_zero_literal = seq(/\d/, optional(dec_digits));

return token(choice(dec_literal, dec_leading_zero_literal));
},

/* Comments */

Expand Down
10 changes: 5 additions & 5 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tree-sitter-tact",
"version": "1.5.1",
"version": "1.5.2",
"description": "A tree-sitter grammar for the Tact programming language",
"author": "Novus Nota (https://github.com/novusnota)",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "tree-sitter-tact"
description = "Tact grammar for tree-sitter"
version = "1.5.1"
version = "1.5.2"
keywords = ["incremental", "parsing", "tree-sitter", "tact"]
classifiers = [
"Intended Audience :: Developers",
Expand Down
50 changes: 48 additions & 2 deletions src/grammar.json

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

Loading