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

feat: add Tact language #756

Open
wants to merge 39 commits into
base: master
Choose a base branch
from
Open

Conversation

novusnota
Copy link

More about the language: https://tact-lang.org

  • Added the vendored tree-sitter-tact
  • Configured the build
  • Updated tree_sitter_parser.rs
  • Updated guess_language.rs
  • Added syntax highlighting queries
  • Added a regression test

Followed the manual, hope everything's correct here :)

novusnota and others added 30 commits January 23, 2024 22:02
Feature-complete and battle-tested!
Version number will match one of the tact compiler.
and small enhancements for Helix queries
* context.scm
* folds.scm
* highlights.scm
* indents.scm
* injections.scm
* locals.scm
* textobjects.scm
* Underscores as numeric separators
* Integers with leading 0

Closes Wilfred#4
* chore[helix]: removed excessive queries which made highlighting worse

* fix: Remove unwanted field
* feat: Update to tree-sitter 0.22.2

* Run `tree-sitter generate` to produce all those files
* Changed Tact version from 1.1.5 to 1.3.0 (to start tracking main branch, no grammar updates yet)

Precedence in queries of upstream has changed from first-wins to last-wins,
so they'll be updated in the following commit to fix the tests

* fix: Queries & Tests for Tree-sitter

* chore: Variety

* chore: Copied upstream helix 24.03 queries

* fix: Reverse the order of Helix queries

To match the upstream changes
* feat: Escape sequences for Tact strings!

* feat: Additions to stdlib through queries and tests
* fix: Make Tree-sitter queries conform to standard

* feat: escape_sequence in highlighting queries of Helix and Neovim

* fix: Narrow the available escape options to match Ohm grammar
…Wilfred#19)

Except for:
* receive/bounced/external parameters
* init parameters
* list of inherited traits ("with ...")
* feat: new CI

* chore: Limit to PRs
…g commas (Wilfred#22)

* feat: Promote non-null assert/unbox (`!!`) into a value expression

* fix: Correctly highlight built-in global static functions

* feat: Trailing commas for trait lists + more tests for trailing commas

* fix: Disable Python, Go and Swift binding test (Restored to the defaults)

* fix: Disable flaky binding tests on Windows (until they're fixed upstream)
* feat: Additional movement captures

* feat: Try/Try...Catch and Bitwise XOR

* feat: Queries for try/try...catch and bitwise XOR (`^`)

* feat: pow2

* feat: dumpStack
* grammar
* tests
* queries (highlighting + textobjects + context, where possible): general, helix, neovim
…ted (Wilfred#29)

* chore: added updated queries after the review in nvim-treesitter

* chore: another batch

* chore: new suggestions

* chore: property -> variable.member

* feat: imports are now foldable
Doesn't require an update in any of the queries!
…ump to 0.22.6 (Wilfred#31)

* chore: bump tree-sitter-cli version

* chore: suggestions to textobjects from code review

* chore: remove unnecessary `@_end`

* chore: parameter.inner/outer stuff

* feat: update Helix textobjects
* feat: match 1.4.0

  * Grammar updates and enhancements, including some unification in naming
  * Tests for the new grammar
  * Queries for Tree-sitter and their tests
  * Queries for Helix and Neovim

* chore: re-order comments

* chore: housekeeping

* tests: check that tree-sitter parses everything that ohm does

At least what Ohm parses in the Tact compiler repo

* chore: nativeThrowWhen → nativeThrowIf

* fix: roll back constant string receivers

As it got postponed until next Tact releases

* feat: foreach loop now uses lvalue instead of an identifier

* feat: optional last semicolon for statements, yay!
* chore: replace _lvalue with _path_expression (assignments) and _expression (foreach)

As a bonus we have one less conflict, which boosts the speed of the
parser despite introducing new choice in _path_expression

* feat: reduce options to type identifiers in `primitive`

* fix: incorrect package manager

* chore: formatting

* fix: erroneous parse of field parent nodes inside structs and messages

Discovered in tact-lsp via hover event-driven debugging :)

* fix: FunC identifiers recognition now matches actual grammar rules of FunC
…285de7f3d0c0717bebf3f17bd'

git-subtree-dir: vendored_parsers/tree-sitter-tact
git-subtree-mainline: 53477fb
git-subtree-split: b3710fe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants