Skip to content

Commit f1c4c37

Browse files
author
James Brundage
committed
feat: Updating Parser Command Type (Fixes #553)
1 parent 8ccfb6d commit f1c4c37

File tree

1 file changed

+25
-24
lines changed

1 file changed

+25
-24
lines changed

PipeScript.ps.psd1

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -29,23 +29,7 @@
2929
'Partial' = @{
3030
Description = 'A partial function.'
3131
Pattern = '(?>PipeScript\p{P})?Partial\p{P}'
32-
}
33-
34-
'PreProcessor' = @{
35-
Description = 'Preprocessing Commands'
36-
Pattern = '
37-
(?>PipeScript\p{P})? # (optionally) PipeScript+Punctuation
38-
PreProc[^\p{P}]+\p{P} # Preproc + Many NotPunctuation + Punctuation
39-
'
40-
}
41-
42-
'PostProcessor' = @{
43-
Description = 'PostProcessing Commands'
44-
Pattern = '
45-
(?>PipeScript\p{P})? # (optionally) PipeScript+Punctuation
46-
PostProc[^\p{P}]+\p{P} # Postproc + Many NotPunctuation + Punctuation
47-
'
48-
}
32+
}
4933

5034
'Optimizer' = @{
5135
Description = 'Optimization Commands'
@@ -125,19 +109,36 @@
125109
'
126110
ExcludeCommandType = 'Application'
127111
}
112+
113+
'PreProcessor' = @{
114+
Description = 'Preprocessing Commands'
115+
Pattern = '
116+
(?>PipeScript\p{P})? # (optionally) PipeScript+Punctuation
117+
PreProc[^\p{P}]+\p{P} # Preproc + Many NotPunctuation + Punctuation
118+
'
119+
ExcludeCommandType = '(?>Application|Script|Cmdlet)'
120+
}
121+
122+
'PostProcessor' = @{
123+
Description = 'PostProcessing Commands'
124+
Pattern = '
125+
(?>PipeScript\p{P})? # (optionally) PipeScript+Punctuation
126+
PostProc[^\p{P}]+\p{P} # Postproc + Many NotPunctuation + Punctuation
127+
'
128+
ExcludeCommandType = '(?>Application|Script|Cmdlet)'
129+
}
128130

129131
'Parser' = @{
130132
Description = 'Parsers'
131-
Pattern = '
132-
(?>PipeScript\p{P})? # Optional PipeScript + Punctuation
133-
Parse[sr]?\p{P} # Parse or Parses or Parser + Punctuation
133+
Pattern = '
134+
Parse[sr]? # Parse or Parses or Parser + Punctuation
134135
(?>
135-
ps1$ # Ending with .ps1
136-
| # or
137-
(?=[^[\p{P}-[\.]]]+$) # Followed by anything but punctuation (except literal periods).
136+
\.ps1$ # Ending with .ps1
137+
| # or
138+
\p{P}
138139
)
139140
'
140-
}
141+
}
141142

142143
'Transpiler' =
143144
@{

0 commit comments

Comments
 (0)