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

Would using treesitter help here? #9

Closed
IndianBoy42 opened this issue Jul 8, 2021 · 2 comments
Closed

Would using treesitter help here? #9

IndianBoy42 opened this issue Jul 8, 2021 · 2 comments

Comments

@IndianBoy42
Copy link

A large collection of language parsers, generates rust bindings, good performance and error recovery

@Wilfred
Copy link
Owner

Wilfred commented Jul 17, 2021

Yeah, I think it's worth exploring. Treesitter seems to have sufficient structure for my needs (e.g. including comments in the AST). Also, I'm already getting bored of parser fixes in syntax.toml :P

I want to focus on getting the tree diffing logic solid at this point. Computing the changes and printing them in a coherent way is already non-trivial, and there's more work to do here.

I will look at treesitter in future though. It would be a matter of converting the treesitter AST to difftastic's AST, and it should hopefully just work.

@Wilfred
Copy link
Owner

Wilfred commented Aug 29, 2021

FWIW difftastic now uses tree-sitter parsing by default :)

Wilfred pushed a commit that referenced this issue Sep 6, 2021
Wilfred pushed a commit that referenced this issue Jan 30, 2022
Wilfred pushed a commit that referenced this issue Feb 3, 2022
## ts-parse

Allows easy task to regen parser before running the normal parse

Test of behavior of mix of `&&` and `{` / `}` in ts-parse
- If bin/generate-parser fails, then ts-parse fails
- If bin/generate-parser succeeds, then the parse result is output regardless of error status

## test-dir
Makes more specific extension/header checking and adds some helpful info
Wilfred pushed a commit that referenced this issue Mar 20, 2022
igorclark pushed a commit to igorclark/difftastic that referenced this issue Mar 28, 2022
jbr pushed a commit to jbr/difftastic that referenced this issue Mar 30, 2022
Wilfred pushed a commit that referenced this issue Apr 14, 2022
ido77778 pushed a commit to ido77778/difftastic that referenced this issue May 3, 2022
🎨  Improve structure of the ast for literals
Wilfred pushed a commit that referenced this issue Jul 11, 2022
Initial punctuation support
Wilfred pushed a commit that referenced this issue Jan 26, 2023
grunweg pushed a commit to grunweg/difftastic that referenced this issue May 5, 2023
mixed_group addition and biblatex_include fix
Thecentury pushed a commit to Thecentury/difftastic that referenced this issue Jan 27, 2024
blmaier pushed a commit to blmaier/difftastic that referenced this issue Feb 13, 2024
Define 'name' field for /delete-node/ and /delete-property/
Duologic pushed a commit to Duologic/difftastic that referenced this issue Mar 22, 2024
This also lays the ground work for fixing the priority
for the binary operators in another PR.

This closes sourcegraph/tree-sitter-jsonnet#6

test plan:
make test
novusnota added a commit to novusnota-forks/difftastic that referenced this issue Aug 25, 2024
* chore[helix]: removed excessive queries which made highlighting worse

* fix: Remove unwanted field
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

No branches or pull requests

2 participants