Add docblocks to tags #1
Open
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 was working on a PHP code completion plugin for vim and to make tag files more useful i needed the docblock comments for the individual tags.
The body of the docblock comment is just copied in as-is (with replacing the
\n\r\twith the string literals"\n""\r""\t"so they still on one line). These comments can be used to show as documentation for the completions, or parse them for return types for methods, or types of properties and parameters. To make this work I've added a new extension field named docblock and modified the php.c to capture comments that look like docblocks as it reads sees them and add them to the tag entries.Without having these in the tag file the plugin would have to look up the tags in their source files and that's a big performance hit.
I'm not sure if you find this useful or not, but your rewritten PHP parser is tremendously useful for me, so i wanted to contribute. (The commit dcfdff7 is unrelated to the docblock feature, but I've found that useful too and can't exclude from this pull request, you can cherry-pick though).