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

Namespaces::getType(): improve detection of namespace keyword as operator #132

Merged

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented May 1, 2020

When the namespace keyword is used in the global namespace, it is less easy to determine with 100% certainty whether it used for a declaration or as an operator, especially when taking into account potential coding errors, such as the use of reserved keywords in the namespace name and/or a leading backslash used in a namespace declaration.

This PR hardens the code and will more often correctly detect whether the namespace keyword is used as an operator when used in the global namespace.

Includes unit tests.

…ator

When the `namespace` keyword is used in the global namespace, it is less easy to determine with 100% certainty whether it used for a declaration or as an operator, especially when taking into account potential coding errors, such as the use of reserved keywords in the namespace name and/or a leading backslash used in a namespace declaration.

This PR hardens the code and will more often correctly detect whether the namespace keyword is used as an operator when used in the global namespace.

Includes unit tests.
@jrfnl jrfnl modified the milestones: 1.0.0, 1.0.0-alpha3 May 1, 2020
@jrfnl jrfnl merged commit 0fa0724 into develop May 1, 2020
@jrfnl jrfnl deleted the feature/namespace-get-type-improve-operator-detection branch May 1, 2020 01:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant