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

Fix regex callback match count #104

Merged
merged 3 commits into from Nov 3, 2014

Conversation

Projects
None yet
3 participants
@ntrel
Contributor

ntrel commented Oct 30, 2014

@masatake

This comment has been minimized.

Member

masatake commented Oct 31, 2014

Thank you. Could you prepare a unit test case which triggers unwanted result if a user runs ctags without your patch? I'm happy if you update docs/f-tracking.rst, too.

@b4n

This comment has been minimized.

Member

b4n commented Oct 31, 2014

@masatake I'm afraid there's no current parser in CTags that use addCallbackRegex() anymore. The last one seem to have been asm.c back in the 2002.
In Geany, the older PHP parser used it (and the fix here was for it), but was replaced by the new non-regex one since then.

So, what I'm saying is it's hard to check a feature that is not used by a parser with the current suite.

Whether the fact it's not used means it should be removed I'm not completely sure, because it's a way of doing a bit more than with plain regexes without a complete "real" parser.

@ntrel

This comment has been minimized.

Contributor

ntrel commented Oct 31, 2014

Could you prepare a unit test case which triggers unwanted result if a user runs ctags without your patch?

As Colomban said, its not clear how to do that. I understand it should be tested somehow though.

I'm happy if you update docs/f-tracking.rst, too.

Now done, let me know if you want any changes to my wording. I also added a commit with more info about parser changes I could think of.

@ntrel

This comment has been minimized.

Contributor

ntrel commented Oct 31, 2014

I wonder if this bug is partly to blame for why no parsers use addCallbackRegex.

@masatake

This comment has been minimized.

Member

masatake commented Oct 31, 2014

Sorry, my words are wrong.

I wanted you to write about both

https://sourceforge.net/p/ctags/bugs/271/
https://sourceforge.net/p/ctags/bugs/320/

in bugs subsection of exuberant-ctags section docs/f-tracking.rst.
Can I ask you this?

@masatake

This comment has been minimized.

Member

masatake commented Oct 31, 2014

@b4n, thank you for input. I would like to keep the code even if it is used now.

@ntrel

This comment has been minimized.

Contributor

ntrel commented Nov 1, 2014

I wanted you to write about both ... in bugs subsection of exuberant-ctags

Now done.

@masatake masatake merged commit 9132f92 into universal-ctags:master Nov 3, 2014

@masatake

This comment has been minimized.

Member

masatake commented Nov 3, 2014

Thank you.

@ntrel ntrel deleted the ntrel:regex-callback-count branch Nov 5, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment