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

Add PHP7 support and other fixes #713

Merged
merged 9 commits into from Dec 24, 2015
Merged

Add PHP7 support and other fixes #713

merged 9 commits into from Dec 24, 2015

Conversation

b4n
Copy link
Member

@b4n b4n commented Dec 10, 2015

No description provided.

Also extend the tests to include inheritance.
Properties not assigned with a value upon declaration were not reported
inside traits.
Be more restrictive as what is accepted as inheritance for classes and
interfaces, to avoid discarding too much tokens facing invalid input.
Be more restrictive as what is accepted as return type declaration
(possibly qualified type name) to avoid discarding too much tokens
facing invalid input.

As a bonus, this also fixes reported function signatures with namespace
references in them, as the `\` is now properly included.

See:
 * https://secure.php.net/manual/en/functions.returning-values.php#functions.returning-values.type-declaration
 * https://secure.php.net/manual/en/functions.arguments.php#functions.arguments.type-declaration.types
@masatake
Copy link
Member

Thank you. I'm reviewing them.
Could you move new test cases to Units/parser-php.r which I have added just now?

@b4n
Copy link
Member Author

b4n commented Dec 11, 2015

Could you move new test cases to Units/parser-php.r which I have added just now?

I can, but I'd rather move all the relevant ones to the subdiretory afterward. But I don't really mind, I can do as you prefer.

@masatake
Copy link
Member

I also don't mind the order;-)
Please, do "the move" any time you are o.k.
I'll review tomorrow JST. I'm sleeply.

@b4n
Copy link
Member Author

b4n commented Dec 11, 2015

BTW, I'd like to add b4n/geany@f481587 to u-ctags too, but currently it doesn't seem possible to report function return type: we don't have varType, and typeRef, while similar, is not really usable (as there is nothing to put in typeRef[0], and it's required).

I thought I remembered a discussion about this fields, but I can't seem to find it, so maybe I dreamed it.

@masatake masatake mentioned this pull request Dec 12, 2015
@masatake
Copy link
Member

(I opend #715 for the interesting topic.)

masatake added a commit to masatake/ctags that referenced this pull request Dec 17, 2015
My question in universal-ctags#713:
> In c.c, c parser doesn't reset AnonymousID.
> Do you think resetting it in each new input is better?
> (I don't have no opinion.)

The answer from @b4n:
I'm pretty sure it's better to reset it, because not doing so would
mean different tags being generated depending on the order files are
processed (or if they are processed all at once or separately).

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
masatake added a commit that referenced this pull request Dec 24, 2015
Add PHP7 support and other fixes
@masatake masatake merged commit 4f88ab2 into universal-ctags:master Dec 24, 2015
@masatake
Copy link
Member

I will work on making slot for recording "return type".

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

Successfully merging this pull request may close these issues.

None yet

2 participants