-
Notifications
You must be signed in to change notification settings - Fork 9
Recognise newer forms of package statement
#12
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
Conversation
|
Actually thinking about this, upstreams may prefer to receive a block form as a But then I couldn't think of a good name for it to have. Things like |
| }, | ||
| "devDependencies": { | ||
| "tree-sitter-cli": "^0.19.4" | ||
| "tree-sitter-cli": "^0.19.5" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we retain 0.19.4 ? I'm sure anyways node is going to use the latest of the minor version, since ^ is present. But I'm planning to do a upgradation to version 0.20 later, so can we revert this change alone?
|
@leonerd , this looks good except for the package.json changes, and the conflicts. We could merge it after this is resolved. |
|
@ganezdragon I don't know if Paul is still active with this (his fork hasn't seen activity for a while as far as I saw), but if not I could redo these changes on a new PR. |
@leonerd and @rabbiveesh deleted this branch, but these changes are really quite welcome (node tree was too flat with a package declaration --i.e. namespace-- not wrapping the statements that follow) so I've re-created just the relevant changes. ganezdragon#12
|
@Leeft we've moved our efforts over to tree-sitter-perl/tree-sitter-perl, b/c this project's parse output is wildly different than what we want. |
|
Weird how I missed that one when searching for packages to use; thank you @rabbiveesh, I'll have a look at that one. |
|
this is closed in #25 |
|
@rabbiveesh , could you brief on what you are looking out of this parser? for example , my usecase is, I'm looking to use this as a parser for my vscode extension for Perl Language server (IDE support) |
|
@ganezdragon It's been a long time since I touched your parser, but I recall a lot of choices that you made in the node names + the way it's arranged that made it preferable for me to fork. IIRC, you have The original reason I started with tree-sitter was because I learned about semgrep, which is a really cool tool built on top of tree-sitter. Although now my main use case is syntax highlighting + folds + other advanced features. |
|
@rabbiveesh , noted. Let me check if I can refactor my code so that it can suit most usecases. |
|
From my perspective the "noisy" node tree isn't a problem: not having enough structure in the tree is. Some examples:
For voice coding it's important the right elements can be targeted for the scopes of all sizes, and in my case that means matching the scopes that Cursorless can target as well as possible; the node tree needs to be quite verbose for that. |
perl 5.12 added
perl 5.14 added
Not being a Node expert I'm not sure whether the incidental changes to some of the other files included here are valid (e.g.
package-lock.json). Please let me know what's the correct way to handle these, as I'll have several more additions and edits to hopefully send PRs for.