You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are a handful of highlighting issues with Windows Batch files:
ECHO: is not recognised, when ECHO. is; ECHO: is faster as it does not do a file lookup! -- see: https://ss64.com/nt/echo.html
The OFF in ECHO OFF is not highlighted
The following code gets highlighting confused (the "$... seems to throw it off)
No space between GOTO and the label name does not highlight correctly; i.e. GOTO:EOF
CLS keyword is not highlighted
EQU / NOT and other comparison operators are not highlighted
IN & DO are not highlighted
command concatenator &, and the pipe operators >, | are not highlighted nor pipe numbers for redirection, e.g. >NUL 2>&1 (a common way to suppress all output)
error-suppressor @ is not highlighted in any way; this needs to be highlighted when used with a command, but not within 'strings' (which may or may not be quoted, according to command used)
ENABLEEXTENSIONS / DISABLEDELAYEDEXPANSION etc. not highlighted along with SETLOCAL
Syntax break-down here: (looks like the quoted paren-escape failed to be noticed)
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 (950b8b0, 2018-04-06T02:26:57.615Z)
OS version: Windows_NT x64 10.0.16299
Extensions: none
The text was updated successfully, but these errors were encountered:
Issue Type: Bug
There are a handful of highlighting issues with Windows Batch files:
ECHO:
is not recognised, whenECHO.
is;ECHO:
is faster as it does not do a file lookup! -- see: https://ss64.com/nt/echo.htmlThe
OFF
inECHO OFF
is not highlightedThe following code gets highlighting confused (the
"$...
seems to throw it off)No space between
GOTO
and the label name does not highlight correctly; i.e.GOTO:EOF
CLS
keyword is not highlightedEQU
/NOT
and other comparison operators are not highlightedIN
&DO
are not highlightedcommand concatenator
&
, and the pipe operators>
,|
are not highlighted nor pipe numbers for redirection, e.g.>NUL 2>&1
(a common way to suppress all output)error-suppressor
@
is not highlighted in any way; this needs to be highlighted when used with a command, but not within 'strings' (which may or may not be quoted, according to command used)ENABLEEXTENSIONS
/DISABLEDELAYEDEXPANSION
etc. not highlighted along withSETLOCAL
Syntax break-down here: (looks like the quoted paren-escape failed to be noticed)
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 (950b8b0, 2018-04-06T02:26:57.615Z)
OS version: Windows_NT x64 10.0.16299
Extensions: none
The text was updated successfully, but these errors were encountered: