@@ -103,9 +103,12 @@ contexts:
103103 scope : keyword.declaration.variable.powershell
104104
105105 expressions :
106+ # Meta
107+ - include : labels
106108 - include : regions
107109 - include : requires-directives
108110
111+ # Normal code
109112 - include : commands
110113 - include : constants
111114 - include : types
@@ -854,6 +857,29 @@ contexts:
854857 2 : constant.numeric.suffix.powershell
855858 push : members
856859
860+ # ##[ LABELS ]##################################################################
861+
862+ labels :
863+ - match : ^\s*((:){{identifier_simple}})
864+ captures :
865+ 1 : entity.name.label.powershell
866+ 2 : punctuation.definition.label.powershell
867+
868+ regions :
869+ - match : ^\s*((#)\s*(region\b)(?:\s*(\S.*))?(\n?))
870+ captures :
871+ 1 : comment.line.powershell
872+ 2 : punctuation.definition.comment.powershell
873+ 3 : keyword.other.region.begin.powershell
874+ 4 : meta.toc-list.powershell entity.name.section.powershell
875+ 5 : meta.fold.begin.powershell
876+ - match : ^\s*((#)\s*(endregion\b).*(\n?))
877+ captures :
878+ 1 : comment.line.powershell
879+ 2 : punctuation.definition.comment.powershell
880+ 3 : keyword.other.region.end.powershell
881+ 4 : meta.fold.end.powershell
882+
857883# ##[ COMMENTS ]################################################################
858884
859885 comments :
@@ -904,21 +930,6 @@ contexts:
904930 - include : pop-eol
905931 - include : comment-embedded-docs
906932
907- regions :
908- - match : ^\s*((#)\s*(region\b)(?:\s*(\S.*))?(\n?))
909- captures :
910- 1 : comment.line.powershell
911- 2 : punctuation.definition.comment.powershell
912- 3 : keyword.other.region.begin.powershell
913- 4 : meta.toc-list.powershell entity.name.section.powershell
914- 5 : meta.fold.begin.powershell
915- - match : ^\s*((#)\s*(endregion\b).*(\n?))
916- captures :
917- 1 : comment.line.powershell
918- 2 : punctuation.definition.comment.powershell
919- 3 : keyword.other.region.end.powershell
920- 4 : meta.fold.end.powershell
921-
922933# ##[ COMPONENTS ]##############################################################
923934
924935 comma-separators :
0 commit comments