Skip to content

Commit 5471e84

Browse files
StartAutomatingStartAutomating
authored andcommitted
feat: Updating Parser Command Type (Fixes #553)
1 parent f1c4c37 commit 5471e84

File tree

1 file changed

+25
-24
lines changed

1 file changed

+25
-24
lines changed

PipeScript.psd1

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,7 @@
1616
'Partial' = @{
1717
Description = 'A partial function.'
1818
Pattern = '(?>PipeScript\p{P})?Partial\p{P}'
19-
}
20-
21-
'PreProcessor' = @{
22-
Description = 'Preprocessing Commands'
23-
Pattern = '
24-
(?>PipeScript\p{P})? # (optionally) PipeScript+Punctuation
25-
PreProc[^\p{P}]+\p{P} # Preproc + Many NotPunctuation + Punctuation
26-
'
27-
}
28-
29-
'PostProcessor' = @{
30-
Description = 'PostProcessing Commands'
31-
Pattern = '
32-
(?>PipeScript\p{P})? # (optionally) PipeScript+Punctuation
33-
PostProc[^\p{P}]+\p{P} # Postproc + Many NotPunctuation + Punctuation
34-
'
35-
}
19+
}
3620

3721
'Optimizer' = @{
3822
Description = 'Optimization Commands'
@@ -112,19 +96,36 @@
11296
'
11397
ExcludeCommandType = 'Application'
11498
}
99+
100+
'PreProcessor' = @{
101+
Description = 'Preprocessing Commands'
102+
Pattern = '
103+
(?>PipeScript\p{P})? # (optionally) PipeScript+Punctuation
104+
PreProc[^\p{P}]+\p{P} # Preproc + Many NotPunctuation + Punctuation
105+
'
106+
ExcludeCommandType = '(?>Application|Script|Cmdlet)'
107+
}
108+
109+
'PostProcessor' = @{
110+
Description = 'PostProcessing Commands'
111+
Pattern = '
112+
(?>PipeScript\p{P})? # (optionally) PipeScript+Punctuation
113+
PostProc[^\p{P}]+\p{P} # Postproc + Many NotPunctuation + Punctuation
114+
'
115+
ExcludeCommandType = '(?>Application|Script|Cmdlet)'
116+
}
115117

116118
'Parser' = @{
117119
Description = 'Parsers'
118-
Pattern = '
119-
(?>PipeScript\p{P})? # Optional PipeScript + Punctuation
120-
Parse[sr]?\p{P} # Parse or Parses or Parser + Punctuation
120+
Pattern = '
121+
Parse[sr]? # Parse or Parses or Parser + Punctuation
121122
(?>
122-
ps1$ # Ending with .ps1
123-
| # or
124-
(?=[^[\p{P}-[\.]]]+$) # Followed by anything but punctuation (except literal periods).
123+
\.ps1$ # Ending with .ps1
124+
| # or
125+
\p{P}
125126
)
126127
'
127-
}
128+
}
128129

129130
'Transpiler' =
130131
@{

0 commit comments

Comments
 (0)