textmate / vhdl.tmbundle

TextMate support for VHDL
0 stars 1 forks source link

Broken syntax highlighting for the language VHDL #1

Open Paebbels opened 7 years ago

Paebbels commented 7 years ago

I reported a broken syntax highlighting on GitHub to the GitHub support. They redirected me to linguist and they in turn redirected me to this project.

Here is the conversation in chronological order:

Hello GitHub's syntax highlighting has some bugs. Please see this issue for the broken highlighting and also an in detail explanation for the underlying problem by one of the users. (End of the issue).

Issue 395 at tgingold/ghdl

Hi Patrick,

Thanks for reaching out!

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.

I hope that helps! Let us know if there's anything else we can do.

Regards, Friday

Hopefully you can tolerate another redirect then, because Linguist isn't responsible for generating and displaying the syntax highlighting you see on the site. ;-) The URL that GitHub support should have redirected you to is this one, here.

If you search for VHDL on that page, you'll see a link to the responsible grammar repository: >textmate/vhdl.tmbundle. Linguist's job is to select the grammar package to provide the highlighting for a specific language... the final result is handled by the selected grammar.

In short, file an issue at textmate/vhdl.tmbundle, not here. =)

vicencb commented 7 years ago

Hi, there is also this other issue, but I think is the same: https://github.com/tgingold/ghdl/issues/369

Regards,   Vicenç.

diogratia commented 7 years ago

The behavior of these two highlight issues stem from an identical cause. Neither subclass of subprogram {function, procedure} is expecting an end statement for highlighting purposes as a first string on a line. It's a dependency on style that neither the function specifications (Issue 395 at tgingold/ghdl) nor the procedure specifications (tgingold/ghdl#369) adhere to, noting that style has nothing to do with valid syntax in VHDL.

Also note that you only need to have the end for the last function or procedure specification appear as the first string on a line to satisfy the following construct (architecture for #369, process for #365). The facility implied here is of limited usefulness demonstrated by the inability to parse the end of constructs without relying on style for boundaries.

While an impressive effort, overkill for Github comments and otherwise style limited for editor use.