@@ -70,17 +70,20 @@ patterns:
70
70
end : \)
71
71
patterns :
72
72
- {include: $self}
73
- - name : string.quoted.double .heredoc.powershell
73
+ - name : string.quoted.single .heredoc.powershell
74
74
begin : ' @'' $'
75
- end : ^'@$
75
+ end : ^'@
76
+ patterns :
77
+ - name : constant.character.escape.powershell
78
+ match : ' '''' '
76
79
- include : ' #numericConstant'
77
80
- name : keyword.operator.logical.powershell
78
81
match : ' -([lg][te]|[ci]?(eq|ne))'
79
82
- name : support.function.powershell
80
83
match : ' (?i:[a-z][a-z0-9]+-[a-z][a-z0-9]+)'
81
84
match : ' (?i:[a-z][a-z0-9]+-?[a-z][a-z0-9]+)(?i:\.(?:exe|cmd|bat|ps1))'
82
85
- name : keyword.control.powershell
83
- match : ' \b(?i:begin|break|catch|class|continue|data|define|do|dynamicparam|else|elseif|end|exit|filter|finally|for|foreach(?!=-object)|from|if|in|inlinescript|parallel|param|process|return|switch|throw|trap|try|until|using|var|while|workflow)\b'
86
+ match : ' \b(?<!\.)(? i:begin|break|catch|class|continue|data|define|do|dynamicparam|else|elseif|end|exit|filter|finally|for|foreach(?!=-object)|from|if|in|inlinescript|parallel|param|process|return|switch|throw|trap|try|until|using|var|while|workflow)\b'
84
87
- name : keyword.operator.comparison.powershell
85
88
match : ' -(?i:is(?:not)?|as)\b'
86
89
- name : keyword.operator.comparison.powershell
@@ -138,7 +141,7 @@ repository:
138
141
comment : really we should match the known attributes first
139
142
- include : ' #variable'
140
143
function :
141
- begin : (function)\s+((?:\p{L}|\d|_|-)+)
144
+ begin : (function|configuration )\s+((?:\p{L}|\d|_|-)+)
142
145
beginCaptures :
143
146
' 0 ' : {name: meta.function}
144
147
' 1 ' : {name: storage.type}
0 commit comments