You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
notepad-plus-plus/lexilla/test/examples/batch/x.bat.folded

64 lines
2.0 KiB

0 400 0 rem comment=1
0 400 0 rem 'echo' is word=2, 'a' is default=0
0 400 0 echo a
0 400 0 rem label=3
0 400 0 :START
0 400 0 rem '@' is hide=4
0 400 0 @echo b
0 400 0 rem 'gcc' is external command=5
0 400 0 gcc --version
0 400 0 rem '%PATH%' is variable=6
0 400 0 echo %PATH%
0 400 0 echo %ProgramFiles(x86)%
0 400 0 rem operator=7 '='
0 400 0 @set Q=A
0 400 0
0 400 0 ::comment=1
0 400 0
0 400 0 :: Bug 1624: this construct produced inconsistent brackets in the past
0 400 0 if ERRORLEVEL 2 goto END
0 400 0 @if exist a (
0 400 0 echo exists
0 400 0 ) else (
0 400 0 echo not
0 400 0 )
0 400 0
0 400 0 FOR /L %%G IN (2,1,4) DO (echo %%G)
0 400 0
0 400 0 :: Bug 1997: keywords not recognized when preceded by '('
0 400 0 IF NOT DEFINED var (SET var=1)
0 400 0
0 400 0 :: Bug 2065: keywords not recognized when followed by ')'
0 400 0 @if exist a ( exit)
0 400 0
0 400 0 :: Bug: with \r or \n, 'command' is seen as continuation
0 400 0 echo word ^
0 400 0 1
0 400 0 command
0 400 0
0 400 0 :: Bug argument and variable expansion
0 400 0 echo %~dp0123
0 400 0 echo %%-~012
0 400 0 echo %%~%%~-abcd
0 400 0 FOR /F %%I in ("C:\Test\temp.txt") do echo %%~dI
0 400 0
0 400 0 :: Bug ending of argument and variable expansion
0 400 0 echo %~dp0\123
0 400 0 echo "%~dp0123"
0 400 0 echo "%%-~012"
0 400 0 echo "%%~%%~-abcd"
0 400 0 FOR /F %%I in ("C:\Test\temp.txt") do echo "%%~dI"
0 400 0
0 400 0 :: Bug escaped %
0 400 0 echo %%0
0 400 0 echo %%%0
0 400 0 echo %%%%~-abcd
0 400 0
Update: Scintilla 5.3.5 Lexilla 5.2.5 update to Scinitlla Release 5.3.5 (https://www.scintilla.org/scintilla535.zip) Released 31 May 2023. On Win32, implement IME context sensitivity with IMR_DOCUMENTFEED. Feature #1310. On Win32 remove dependence on MSIMG32.DLL by replacing AlphaBlend by GdiAlphaBlend. Bug #1923. On Qt, stop movement of IME candidate box. On Qt, report correct caret position within paragraph for IME retrieve surrounding text. On Qt for Cocoa, fix crash in entry of multi-character strings with IME. and Lexilla Release 5.2.5 (https://www.scintilla.org/lexilla525.zip) Released 31 May 2023. Add CharacterSetArray constructor without setBase initial argument for common case where this is setNone and the initialSet argument completely defines the characters. This shortens and clarifies use of CharacterSetArray. Bash: implement highlighting inside quoted elements and here-docs. Controlled with properties lexer.bash.styling.inside.string, lexer.bash.styling.inside.backticks, lexer.bash.styling.inside.parameter, and lexer.bash.styling.inside.heredoc. Issue #154, Issue #153, Feature #1033. Bash: add property lexer.bash.command.substitution to choose how to style command substitutions. 0 → SCE_SH_BACKTICKS; 1 → surrounding "$(" and ")" as operators and contents styled as bash code; 2 → use distinct styles (base style + 64) for contents. Choice (2) is a provisional feature and details may change before it is finalized. Issue #153. Bash: fix nesting of parameters (SCE_SH_PARAM) like ${var/$sub/"${rep}}"}. Issue #154. Bash: fix single character special parameters like $? by limiting style. Issue #154. Bash: treat "$$" as special parameter and end scalars before "$". Issue #154. Bash: treat "<<" in arithmetic contexts as left bitwise shift operator instead of here-doc. Issue #137. Batch: style SCE_BAT_AFTER_LABEL used for rest of line after label which is not executed. Issue #148. F#: Lex interpolated verbatim strings as verbatim. Issue #156. VB: allow multiline strings when lexer.vb.strings.multiline set. Issue #151. Close #13729
2 years ago
0 400 0 :TEST that after label style works
0 400 0 :: Bug 2304: "::" comments not recognised when second command on line
0 400 0 Set /A xxx=%xxx%+1 & :: Increment
0 400 0 Set /A xxx=%xxx%+1 & ::Increment
0 400 0 Set /A xxx=%xxx%+1 & rem Increment
0 400 0
0 400 0 :END
0 400 0