Czukowski created NETBEANS-3415:
-----------------------------------
Summary: Identifiers containing exotic characters not recognized
by syntax parser
Key: NETBEANS-3415
URL: https://issues.apache.org/jira/browse/NETBEANS-3415
Project: NetBeans
Issue Type: Bug
Components: php - Code
Affects Versions: 11.2
Reporter: Czukowski
Although it is rather uncommon to encounter non-ASCII characters used in
class/method/variable/constant names and writing such code would probably
account to bad practice, it can be a little irritating that NetBeans keeps
flagging such occurrences as syntax errors.
According to the docs on
[classes|https://www.php.net/manual/en/language.oop5.basic.php],
[functions|https://www.php.net/manual/en/functions.user-defined.php],
[variables|https://www.php.net/manual/en/language.oop5.basic.php],
[constants|https://www.php.net/manual/en/language.constants.php], character
range 80..FF also belongs to "letters".
For example, this is valid:
{code:php}
class MessageFactory {
public const 🐛 = 'It is a bug!'; // 🐛 is EE 94 A5 in UTF-8
}
{code}
Since there is an officially documented regex (which is also the same for all
these identifier types), perhaps NetBeans PHP parser could be extended to
recognize the whole range of possible characters.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists