Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Conversation

azjezz
Copy link
Collaborator

@azjezz azjezz commented Dec 9, 2022

caught in wordpress :)

ref: https://3v4l.org/rhZ7e

Signed-off-by: azjezz <azjezz@protonmail.com>
@azjezz azjezz force-pushed the keywords-for-func-names branch from 307fac6 to 14d677b Compare December 9, 2022 06:53
Comment on lines +130 to +138
pub fn is_soft_reserved_ident(kind: &TokenKind) -> bool {
matches!(kind, |TokenKind::Parent| TokenKind::Self_
| TokenKind::True
| TokenKind::False
| TokenKind::Null
| TokenKind::Enum
| TokenKind::From
| TokenKind::Readonly)
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could actually allow much more keywords to be used for function names/calls ( class, interface, trait, extends, implements, private, public, protected, static, or, xor, and, endif, endwhile, endswitch, .. etc ), but PHP doesn't, so 🤷‍♂️

@azjezz azjezz merged commit 89866d9 into main Dec 9, 2022
@azjezz azjezz deleted the keywords-for-func-names branch December 9, 2022 06:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

1 participant