Skip to content

Commit f5cbac6

Browse files
committed
Extract --% to a named context
1 parent 8b35b0b commit f5cbac6

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

PowerShell.sublime-syntax

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ contexts:
6767

6868
# Normal code
6969
- include: escape-sequences
70+
- include: literal-after
7071

7172
- include: commands
7273
- include: constants
@@ -82,8 +83,8 @@ contexts:
8283
- include: arrays
8384
- include: subexpressions
8485

85-
# Consume a string with a trailing dot
86-
# to prevent members with particular names from being recognized as keywords.
86+
# Consume a string with a trailing dot to prevent members with
87+
# particular names from being recognized as keywords.
8788
- match: \b[\w-]+(?=\.)
8889
scope: variable.other.object.powershell
8990
push: members
@@ -95,17 +96,17 @@ contexts:
9596
- match: \b(?i:var){{kebab_break}}
9697
scope: keyword.declaration.variable.powershell
9798

99+
- include: operators
100+
- include: parameters
98101

99-
# Make everything afterward a literal
102+
literal-after:
100103
- match: \B--%\B
101104
scope: keyword.control.powershell
102105
push:
103106
- meta_include_prototype: false
104107
- meta_content_scope: string.unquoted.powershell
105108
- include: pop-before-eol
106109

107-
- include: operators
108-
- include: parameters
109110
###[ EXCEPTIONS ]##############################################################
110111

111112
exceptions:

0 commit comments

Comments
 (0)