-
Notifications
You must be signed in to change notification settings - Fork 347
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
Conversation
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
fix: minor README.md tweaks
* 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
Sorry, but difftastic is approaching the limits of what I can distribute on crates.io, and the binaries are getting really big, so I need to set a limit on which languages I add. Tact is a fairly small blockchain language that I can't justify adding. Your fork will still work great, and eventually I hope to have pluggable parsers so I don't have this restriction. |
@Wilfred Thanks for the response and your time! Sure, pluggable parsers definitely seem like a better option than to vendor them in via git. Perhaps, difftastic could take the approach of NeoVim and Helix: one only needs to specify the basic info about the parser, like does it have That approach has its downsides of course, but it works well enough in practice :) |
More about the language: https://tact-lang.org
tree_sitter_parser.rs
guess_language.rs
Followed the manual, hope everything's correct here :)