Skip to content

Commit 8d4ae61

Browse files
Joel BennettJaykul
authored andcommitted
fix single-quote herestring and add PS4 tests
1 parent b8f8ac2 commit 8d4ae61

File tree

4 files changed

+1571
-1523
lines changed

4 files changed

+1571
-1523
lines changed

Support/PowershellSyntax.YAML-tmLanguage

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,17 +70,20 @@ patterns:
7070
end: \)
7171
patterns:
7272
- {include: $self}
73-
- name: string.quoted.double.heredoc.powershell
73+
- name: string.quoted.single.heredoc.powershell
7474
begin: '@''$'
75-
end: ^'@$
75+
end: ^'@
76+
patterns:
77+
- name: constant.character.escape.powershell
78+
match: ''''''
7679
- include: '#numericConstant'
7780
- name: keyword.operator.logical.powershell
7881
match: '-([lg][te]|[ci]?(eq|ne))'
7982
- name: support.function.powershell
8083
match: '(?i:[a-z][a-z0-9]+-[a-z][a-z0-9]+)'
8184
match: '(?i:[a-z][a-z0-9]+-?[a-z][a-z0-9]+)(?i:\.(?:exe|cmd|bat|ps1))'
8285
- 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'
8487
- name: keyword.operator.comparison.powershell
8588
match: '-(?i:is(?:not)?|as)\b'
8689
- name: keyword.operator.comparison.powershell
@@ -138,7 +141,7 @@ repository:
138141
comment: really we should match the known attributes first
139142
- include: '#variable'
140143
function:
141-
begin: (function)\s+((?:\p{L}|\d|_|-)+)
144+
begin: (function|configuration)\s+((?:\p{L}|\d|_|-)+)
142145
beginCaptures:
143146
'0': {name: meta.function}
144147
'1': {name: storage.type}

0 commit comments

Comments
 (0)