Skip to content
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

byte offsets of symbols #1502

Closed
hanwen opened this issue Jun 30, 2017 · 2 comments
Closed

byte offsets of symbols #1502

hanwen opened this issue Jun 30, 2017 · 2 comments

Comments

@hanwen
Copy link
Contributor

hanwen commented Jun 30, 2017

I need exact offsets of where the tags are in the content. Currently, I look for the tag on the line, which kind of works, except that that can easily go wrong if the tag name is very short or common, or the lines have multiple declarations.

Would it be possible to have the column within the line where the tag occurs, or even better the byte offset relative to start of file of the tag?

If not, is it guaranteed that the tags will be found in order of occurrence?

@masatake
Copy link
Member

masatake commented Jul 1, 2017

Would it be possible to have the column within the line where the tag occurs, or even better the byte offset relative to start of file of the tag?

Difficult. The main part of ctags can provide the byte offset information to parsers. However, each parser must utilize the information. So we have to work on each parser. The implementations are very different in parser by parser.

So I cannot solve this issue quickly. However, I would like to hear if you have a primary target language.

If not, is it guaranteed that the tags will be found in order of occurrence?

The order is not guaranteed. Typical case that breaks the order can be found in #1495.

@hanwen
Copy link
Contributor Author

hanwen commented Jul 1, 2017

That is unfortunate, but understandable. I have no primary target language.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants