Draft
Conversation
|
Not sure if this may help, but I get a slightly different output with ts-phpdoc:master and ts-php:0.24.0 (also 0.24.2): |
This file contains hidden or 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
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.
I'm parking this here for now, perhaps others can take a peek and offer suggestions.
Updating to tree-sitter-php v0.24 also needs an update to tree-sitter v0.25, because the PHP grammar is making use of the
reserved()API that was introduced in that version. I've been able to pull in thereservedsettings from the PHP grammar and (I think) wire them up, but I'm stuck with a error:This error seems to be coming from https://github.com/tree-sitter/tree-sitter/blob/eacb95c85da15005f091729f3225609d0db67963/crates/generate/src/prepare_grammar/extract_tokens.rs#L225, but I suspect that we are just missing some other grammar config, because even just copying the PHP reserved words into this grammar as static strings (vs trying to import/rebuild, as in this PR) results in this error. And changing the value of the first entry in the
classesreserved set will just give the same error, but w/ the updated value:So I suspect that I'm just missing something about this new API and how it works, or some other change that happened when the PHP grammar adopted the new API in tree-sitter/tree-sitter-php@33d7002
Suggestions and input are welcome!