Add docblocks to tags#1
Open
complex857 wants to merge 5 commits into
Open
Conversation
added 5 commits
January 13, 2014 21:45
The command field for the namespace tags was containing the previous line from the file because I've forgot to delete old code for function parameter's default value.
The previous commit was supposed to fix the issues caused by this. If you compiled the code with -O2 or higher the tag lines for namespaces contained the previous line as the command field, but this caused other problems for other people too, see: http://sourceforge.net/p/ctags/bugs/312/ Alternatively, you could define FILE_WRITE in every file where this bug manifests too, but this patch makes it easier to fix these kinds of errors. The patch was inspired by the homebrew's ctags recipe.
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 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).