Closed Bilge closed 1 year ago
This is the first time I hear about PhpStorm, so my guess is they are not using this parser. I would say raise this issue with them first. I did some brief googling and found nothing about their relation to this project.
Right or wrong, you are nevertheless credited for the Shell Script plugin, unless it just means it can (optionally) integrate with these tools.
I see. It appears they only use shfmt for formatting (https://github.com/JetBrains/intellij-community/blob/a98897a49e33d58c06dee6d6b07f98316cc9c145/plugins/sh/core/src/com/intellij/sh/formatter/ShExternalFormatter.java#L71) and not for syntax highlighting. Which makes sense, because shfmt does not fail on the example you posted above.
Thanks and sorry for bothering you.
Is this the syntax highlighter used by Jetbrains' PhpStorm? If so, I have a parser syntax highlighting bug to report. This code will break syntax highlighting for the entire remainder of the file.
It requires quoted subshells assigned to arguments of an array, the first of which has a command whose name starts with a colon (
:
) and has at least one quoted argument. I realise that's quite a long and obscure list of requirements but it occurs in the real world, believe it or not!It does not matter how many arguments are quoted, so
"$(:a "b" c)"
causes the issue, as well as"$(:a "b" "c")"
, but not"$(:a b c)"
(because there are no quotes embedded in the subshell) and not"$(a "b" c)"
(because the command name doesn't begin with the colon (:
) character.📝 If this is the correct project to post this issue in, I have a few other parser breaks to submit also.