-
Notifications
You must be signed in to change notification settings - Fork 4
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 CI workflow, and update tree-sitter #4
Conversation
Please use the official workflows: https://github.com/tree-sitter/workflows |
6fa7a21
to
b66431c
Compare
…y `tree-sitter generate` does not work with the reference tree-sitter workflow
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.
Overall I think this looks good, but there are two things I think need to be fixed.
Cargo.toml
Outdated
@@ -1,26 +1,23 @@ | |||
[package] | |||
name = "tree-sitter-ql-dbscheme" | |||
description = "ql dbscheme grammar for the tree-sitter parsing library" | |||
name = "tree-sitter-dbscheme" |
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.
Not sure about this rename. The repo is still called tree-sitter-ql-dbscheme
, after all.
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.
But the parser is. Having the repo named different from the language is not really intended.
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.
That is because the name in gammar.js
is wrong. The generate script is copy-pasting from there.
I'm fixing it.
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.
I'm not sure I follow. The parser is what? (Edit: Ah, @erik-krogh's interim answer cleared this up for me.)
Currently, the name of the parser is tree-sitter-ql-dbscheme
. This is also how the (to my knowledge) only downstream user refers to it.
To be clear, I would be happy to see this renamed to tree-sitter-dbscheme
. The original name contained -ql-
out of an abundance of caution, in case some other user of dbscheme
was out there.
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.
Currently the grammar is named dbscheme
.
I cannot change it to ql-dbscheme
, because then tree-sitter gives me the following error:
Error: Grammar's 'name' property must not start with a digit and cannot contain non-word characters.
.
What can we do?
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.
Try underscore instead? ql_dbscheme
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.
(To be clear, I'm not saying you're doing it wrong; I'm just pointing out that the tooling is built with different expectations, so you can't trust it blindly if you deviate. You'll just have to postprocess manually.)
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.
Underscore seem to work
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.
Yep, a number of other grammars use that trick.
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.
I think this looks reasonable. (As with the corresponding changes to tree-sitter-ql
, QlDbscheme
is a bit weird in the description of the package, but I don't care strongly about it.)
No description provided.