You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To support phpdoc blocks we have to use so called injections. This means delegating responsibility to other parsers.
it's a recommended way. JS tree-sitter has corresponding jsdoc too.
It requires creating additional parser and probably separate variables for phpdoc for highlights but tree sitter inspector detects additional nodes in comments.
To support phpdoc blocks we have to use so called
injections
. This means delegating responsibility to other parsers.it's a recommended way. JS tree-sitter has corresponding jsdoc too.
Based on a discussion in tree-sitter/tree-sitter-php#50
Here is an example from NVIM treesitter plugin:
https://github.com/nvim-treesitter/nvim-treesitter/blob/master/queries/php/injections.scm
We have to use https://github.com/claytonrcarter/tree-sitter-phpdoc
The same is going to apply if we would like to support SQL queries in strings
The text was updated successfully, but these errors were encountered: