@@ -858,46 +858,46 @@ contexts:
858858
859859 operator-words :
860860 # RegExp context
861- - match : \B (-)(?i:[ic]?(?:not)?(?:match)){{kebab_break }}
861+ - match : (-)(?i:[ic]?(?:not)?(?:match)){{operator_break }}
862862 scope : keyword.operator.logical.powershell
863863 captures :
864864 1 : punctuation.definition.keyword.powershell
865865 push : expect-regex-string
866- - match : \B (-)(?i:replace){{kebab_break }}
866+ - match : (-)(?i:replace){{operator_break }}
867867 scope : keyword.operator.string.powershell
868868 captures :
869869 1 : punctuation.definition.keyword.powershell
870870 push : expect-regex-string
871871
872- - match : \B (-)(?i:as){{kebab_break }}
872+ - match : (-)(?i:as){{operator_break }}
873873 scope : keyword.operator.cast.powershell
874874 captures :
875875 1 : punctuation.definition.keyword.powershell
876- - match : \B (-)(?i:[ic]?(?:eq|ne|[gl][te])){{kebab_break }}
876+ - match : (-)(?i:[ic]?(?:eq|ne|[gl][te])){{operator_break }}
877877 scope : keyword.operator.comparison.powershell
878878 captures :
879879 1 : punctuation.definition.keyword.powershell
880- - match : \B (-)(?i:[ic]?(?:not)?(?:like|contains|in)){{kebab_break }}
880+ - match : (-)(?i:[ic]?(?:not)?(?:like|contains|in)){{operator_break }}
881881 scope : keyword.operator.logical.powershell
882882 captures :
883883 1 : punctuation.definition.keyword.powershell
884- - match : \B (-)(?i:join|split){{kebab_break }}
884+ - match : (-)(?i:join|split){{operator_break }}
885885 scope : keyword.operator.string.powershell
886886 captures :
887887 1 : punctuation.definition.keyword.powershell
888- - match : \B (-)(?i:is(?:not)?){{kebab_break }}
888+ - match : (-)(?i:is(?:not)?){{operator_break }}
889889 scope : keyword.operator.logical.powershell
890890 captures :
891891 1 : punctuation.definition.keyword.powershell
892- - match : \B (-)(?i:and|or|not|xor){{kebab_break }}
892+ - match : (-)(?i:and|or|not|xor){{operator_break }}
893893 scope : keyword.operator.logical.powershell
894894 captures :
895895 1 : punctuation.definition.keyword.powershell
896- - match : \B (-)(?i:band|bor|bnot|bxor|sh[lr]){{kebab_break }}
896+ - match : (-)(?i:band|bor|bnot|bxor|sh[lr]){{operator_break }}
897897 scope : keyword.operator.bitwise.powershell
898898 captures :
899899 1 : punctuation.definition.keyword.powershell
900- - match : \B (-)(?i:f){{kebab_break }}
900+ - match : (-)(?i:f){{operator_break }}
901901 scope : keyword.operator.string-format.powershell
902902 captures :
903903 1 : punctuation.definition.keyword.powershell
@@ -1174,15 +1174,15 @@ contexts:
11741174
11751175 numbers :
11761176 # Binary numbers
1177- - match : \b (0[bB])([01]*)({{int_suffix}}?{{unit_suffix}}?)
1177+ - match : (0[bB])([01]*)({{int_suffix}}?{{unit_suffix}}?)
11781178 scope : meta.number.integer.binary.powershell
11791179 captures :
11801180 1 : constant.numeric.base.powershell
11811181 2 : constant.numeric.value.powershell
11821182 3 : constant.numeric.suffix.powershell
11831183 push : members
11841184 # Hexadecimal numbers
1185- - match : \b (0[xX])(\h*)({{int_suffix}}?{{unit_suffix}}?)
1185+ - match : (0[xX])(\h*)({{int_suffix}}?{{unit_suffix}}?)
11861186 scope : meta.number.integer.hexadecimal.powershell
11871187 captures :
11881188 1 : constant.numeric.base.powershell
@@ -1215,14 +1215,14 @@ contexts:
12151215 8: constant.numeric.suffix.powershell
12161216 push: members
12171217 # "Decimal" numbers
1218- - match : \b (\d+)({{dec_suffix}}{{unit_suffix}}?)
1218+ - match : (\d+)({{dec_suffix}}{{unit_suffix}}?)
12191219 scope : meta.number.float.decimal.powershell
12201220 captures :
12211221 1 : constant.numeric.value.powershell
12221222 2 : constant.numeric.suffix.powershell
12231223 push : members
12241224 # Integers
1225- - match : \b (\d+)({{int_suffix}}?{{unit_suffix}}?)
1225+ - match : (\d+)({{int_suffix}}?{{unit_suffix}}?)
12261226 scope : meta.number.integer.decimal.powershell
12271227 captures :
12281228 1 : constant.numeric.value.powershell
@@ -1367,6 +1367,7 @@ contexts:
13671367
13681368variables :
13691369 kebab_break : (?![\w-])
1370+ operator_break : (?![[:alpha:]]|-\d)
13701371 builtin_types : |-
13711372 \b(?x:
13721373 void | null | object | bool | char | string
0 commit comments