textmate/php.tmbundle

Function argument default values considered invalid

Opened this issue · 1 comments

Hey

I got redirected from GitHub, since the problem comes from this language grammar.
I have noticed that on Github (I don't know any other place explicitely which use this language grammar :)) the syntax highlighting highlights function arguments default values as white text on red background (null seems to be the only thing valid). GitHub said that if that happens, then the language grammar thinks it's a syntax error. But since this is definitely not the case, this should get fixed.

A sample can be viewed here: https://github.com/CharlotteDunois/Yasmin/blob/master/src/Models/Guild.php#L788

Original email response:

White text on red background highlight means that the language grammar thinks there is a syntax error. There might actually be a syntax error, or it could just be a bug in the language grammar.

We use open source TextMate-style language grammars for syntax highlighting, which are available here:

https://github.com/github/linguist/blob/master/grammars.yml

The fastest way to get this fixed would be to open an issue or contribute a fix for your specific grammar concern in the repository.

Linguist pulls in grammar updates with each new release, which usually happens every couple of weeks. This should get fixed on GitHub.com shortly after that happens.

Best Regard
Charlotte

This has been corrected by 706c680, also added was return-type matching.

Note: Github pulls in grammar changes every 2-6 weeks, so it may be a bit before this is active on Github.