-
Notifications
You must be signed in to change notification settings - Fork 348
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
Add support for PureScript #708
Open
bernhard-herzog
wants to merge
178
commits into
Wilfred:master
Choose a base branch
from
bernhard-herzog:purescript
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…rescript thankfully doesn't have)
- Try to fix the record syntax, but fail - Change to Purescript import declarations
Forgot to delete some fields after copying them elsewhere
Doing better than before
A complication here is that do/ado blocks are allowed to use `let` binders, which in turn has ambiguous interpretation wrt `let in` expressions, so something like ``` ado let a = 1 in a ``` becomes rather tricky. The solution is to remove `let in` expressions from the list of options for a do/ado-block binder-indentation level statements. They aren't allowed in PS itself, unless parenthesized. But this is buried a bit deep inside a hierarchy of parsers so the code involves some duplication, basically writing out almost the same thing twice, for do/ado blocks and for normal notation. It still doesn't handle cases where `in` terminator is one the same line with a `let` binder, so it will require some more fiddling.
Improve Applicative Do notation parsing
PureScript support has been recently added to Zed editor in zed-industries/zed#6911, updated the README accordingly
I suspect this is what causing issues for multiple projects attempting to use this grammar: - neurocyte/zat#1 - zed-industries/zed#7543 (comment) Don't know why it wasn't static in the first place (in the original Haskell grammar), but I looked at what other grammars do and none export any functions other than those used by Tree-sitter.
Add Rust bindings
As noted by @amaanq over Neovim tree-sitter Matrix channel, they're implied. In recent TS versions they generate warnings.
Fixes warnings upon codegen.
* Update queries to 0.21.0 * Format remaining queries * Run codegen on 0.21.0 * Fix missing scanner include for Go bindings * Fix casing in `bindings/rust/lib.rs`
Those were not replaced automatically upon codegen with ts 0.21.0
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds support for PureScript using the tree-sitter grammar suggested
in #674
The tree-sitter grammar for PureScript seems to have issues similar to
the Haskell, in that the nodes for a qualified identifier like
Data.Map
do not include nodes for the periods. The code in this PRuses the same workaround as for Haskell, i.e. the relevant nodes are
listed
atom_nodes