Skip to content

Commit

Permalink
feat: Adding Language Command Type (Fixes #519)
Browse files Browse the repository at this point in the history
  • Loading branch information
James Brundage committed Nov 11, 2023
1 parent 0a5857e commit 0f5c4b6
Showing 1 changed file with 40 additions and 27 deletions.
67 changes: 40 additions & 27 deletions PipeScript.ps.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,19 @@
'
CommandType = '(?>Function|Alias)'
}

'Language' = @{
Description = 'Language Commands describe languages'
Pattern = '

Check warning on line 92 in PipeScript.ps.psd1

View workflow job for this annotation

GitHub Actions / PowerShellStaticAnalysis

PSAvoidTrailingWhitespace : Line has trailing whitespace
Language # Language
(?>
\.ps1$ # ending with .ps1
| # or
\p{P} # followed by punctuation
)
'
CommandType = '(?>Function)'
}

Check warning on line 102 in PipeScript.ps.psd1

View workflow job for this annotation

GitHub Actions / PowerShellStaticAnalysis

PSAvoidTrailingWhitespace : Line has trailing whitespace
'Interface' = @{
Description = 'An Interface Command'
Expand Down Expand Up @@ -154,35 +167,35 @@
'
}

'Transform' = @{
Description = 'Transforms'
Pattern = '
(?>
# Transforms have two forms, one that is very "query" friendly
'Transform' = @{
Description = 'Transforms'
Pattern = '
(?>
# Transforms have two forms, one that is very "query" friendly
\=\> # =>
(?<TransformName>[^\p{Ps}\<]+)? # Optional transform name
[\p{Ps}\<] # Transform From Type Start
(?<TransformFrom>[^\p{Pe}\>]+) # TransformFrom
[^\p{Pe}\>] # Transform From Type End
(?:
\=\> # =>
(?<TransformName>[^\p{Ps}\<]+)? # Optional transform name
[\p{Ps}\<] # Transform From Type Start
(?<TransformFrom>[^\p{Pe}\>]+) # TransformFrom
[^\p{Pe}\>] # Transform From Type End
(?:
\=\> # =>
(?<TransformToName>[^\p{Ps}\<]+)? # Optional to name
[\p{Ps}\<] # Transform To Type Start
(?<TransformTo>[^\p{Pe}\>]+) # Transform To
[^\p{Pe}\>] # Transform To Type End
)?
|
# The other form is fairly normal:
Transform(?>s|er)? # Transform or Transforms or Transformer
(?>
\.ps1$ # ending with .ps1
| # or
\p{P} # followed by punctuation
)
(?<TransformToName>[^\p{Ps}\<]+)? # Optional to name
[\p{Ps}\<] # Transform To Type Start
(?<TransformTo>[^\p{Pe}\>]+) # Transform To
[^\p{Pe}\>] # Transform To Type End
)?
|
# The other form is fairly normal:
Transform(?>s|er)? # Transform or Transforms or Transformer
(?>
\.ps1$ # ending with .ps1
| # or
\p{P} # followed by punctuation
)
'
ExcludeCommandType = '(?>Application|Script|Cmdlet)'
}
)
'
ExcludeCommandType = '(?>Application|Script|Cmdlet)'
}

'Template' =
@{
Expand Down

0 comments on commit 0f5c4b6

Please sign in to comment.