diff --git a/Batch File/Batch File.sublime-syntax b/Batch File/Batch File.sublime-syntax index d2306a3ee5..5e59893c7a 100644 --- a/Batch File/Batch File.sublime-syntax +++ b/Batch File/Batch File.sublime-syntax @@ -27,8 +27,14 @@ contexts: - include: escaped_characters - include: variables - include: commands - - match: \b(?i)(?:goto|call|exit)\b + - match: \b(?i)exit\b scope: keyword.control.statement.dosbatch + - match: \b(?i)(goto|call)\b(?:\s*(:)?(?:(eof)|(\w+)))? + captures: + 1: keyword.control.statement.dosbatch + 2: punctuation.separator.dosbatch + 3: keyword.control.flow.return.dosbatch + 4: meta.function-call.dosbatch variable.function.dosbatch - match: \b(?i)(if)\s+(?:(not)\s+)?(exist|defined|errorlevel|cmdextversion)\b captures: 1: keyword.control.conditional.dosbatch diff --git a/Batch File/Symbol List.tmPreferences b/Batch File/Symbol List.tmPreferences index 3e60a1b0bc..c9efab6d70 100644 --- a/Batch File/Symbol List.tmPreferences +++ b/Batch File/Symbol List.tmPreferences @@ -4,11 +4,13 @@ name Symbol List scope - source.dosbatch entity.name.label.dosbatch + source.dosbatch entity.name.label - meta.function-call settings showInSymbolList 1 + showInIndexedSymbolList + 1 diff --git a/Batch File/syntax_test_batch_file.bat b/Batch File/syntax_test_batch_file.bat index 8c578c8178..fdeaa17f4d 100644 --- a/Batch File/syntax_test_batch_file.bat +++ b/Batch File/syntax_test_batch_file.bat @@ -67,6 +67,18 @@ ECHO " GOTO:EOF :: ^^^^ keyword.control.statement.dosbatch +:: ^ punctuation.separator.dosbatch +:: ^^^ keyword.control.flow.return.dosbatch + + GOTO :End +:: ^^^^ keyword.control.statement.dosbatch +:: ^ punctuation.separator.dosbatch +:: ^^^ meta.function-call.dosbatch variable.function.dosbatch + + GOTO:End +:: ^^^^ keyword.control.statement.dosbatch +:: ^ punctuation.separator.dosbatch +:: ^^^ meta.function-call.dosbatch variable.function.dosbatch :: Redirection ECHO Hello World! > hello.txt