mmims / language-batchfile

Windows batch file language support for Atom.
MIT License
34 stars 8 forks source link

Batch Script syntax highlighting issues #26

Closed aeschli closed 6 years ago

aeschli commented 6 years ago

From @Kroc on April 6, 2018 8:35

Issue Type: Bug

There are a handful of highlighting issues with Windows Batch files:


Aside: What would be the best way to broach a discussion on using a PEG-based parser, rather than the regex-infused TextMate system for VSCode? Windows Batch files happen to be one of the best examples of extremely complex mode-like behaviour that would be easily and elegantly handled by a real state machine based approach using PEG/EBNF grammars. Grammar based parsing would also be readily shareable between language servers and other external software.


VS Code version: Code 1.22.1 (950b8b0d37a9b7061b6f0d291837ccc4015f5ecd, 2018-04-06T02:26:57.615Z) OS version: Windows_NT x64 10.0.16299

Extensions: none

Copied from original issue: Microsoft/vscode#47297

mmims commented 6 years ago

I've started looking at some of these issues, but there's quite a bit to go through here. Some of the issues (i.e. EQU, NOT, @, redirection characters) can be attributed to the syntax theme. They are scoped, but if the syntax theme you are using does not have a style definition for that scope, they will appear not be highlighted.

I will get fixes out for some of the easier issues to fix. The others might take some time. As mentioned, batch files have a rather complex "language" that is becoming increasingly difficult to express using these regex based definitions.

Kroc commented 6 years ago

OK, thank you very much; I am using the default theme and no extensions -- so the lack of applied colours should be resolve upstream