Skip to content

Commit b5e77ed

Browse files
🚀 [Feature]: Standardize casing for 'Ast' (#19)
## Description This pull request includes changes to multiple PowerShell functions to standardize the capitalization of "AST" to "Ast" and to rename several functions for consistency. The most important changes are as follows: ### Standardization of "AST" to "Ast": * [`src/functions/public/Core/Get-ASTCommand.ps1`](diffhunk://#diff-c418410cd6d3505ed477b3cd920729a9ee2eb06e2ebaf9801f7d18042134531eL4-R9): Changed all instances of "AST" to "Ast" in the function documentation and parameter descriptions. [[1]](diffhunk://#diff-c418410cd6d3505ed477b3cd920729a9ee2eb06e2ebaf9801f7d18042134531eL4-R9) [[2]](diffhunk://#diff-c418410cd6d3505ed477b3cd920729a9ee2eb06e2ebaf9801f7d18042134531eL22-R22) [[3]](diffhunk://#diff-c418410cd6d3505ed477b3cd920729a9ee2eb06e2ebaf9801f7d18042134531eL34-R34) [[4]](diffhunk://#diff-c418410cd6d3505ed477b3cd920729a9ee2eb06e2ebaf9801f7d18042134531eL47-R53) [[5]](diffhunk://#diff-c418410cd6d3505ed477b3cd920729a9ee2eb06e2ebaf9801f7d18042134531eL83-R83) * [`src/functions/public/Core/Get-ASTFunction.ps1`](diffhunk://#diff-12c0e9214da31ea8123c85ed3408e69da86bc14630c6153967d9fe203f903d23L4-R8): Updated "AST" to "Ast" in the function documentation and parameter descriptions. [[1]](diffhunk://#diff-12c0e9214da31ea8123c85ed3408e69da86bc14630c6153967d9fe203f903d23L4-R8) [[2]](diffhunk://#diff-12c0e9214da31ea8123c85ed3408e69da86bc14630c6153967d9fe203f903d23L46-R52) [[3]](diffhunk://#diff-12c0e9214da31ea8123c85ed3408e69da86bc14630c6153967d9fe203f903d23L82-R82) * [`src/functions/public/Core/Get-ASTScript.ps1`](diffhunk://#diff-066935b5ba09d1a7e26efc9c07f4fa89f59179d42965af3b1b0b88ce2baf3024L4-R7): Modified "AST" to "Ast" in the function documentation and parameter descriptions. [[1]](diffhunk://#diff-066935b5ba09d1a7e26efc9c07f4fa89f59179d42965af3b1b0b88ce2baf3024L4-R7) [[2]](diffhunk://#diff-066935b5ba09d1a7e26efc9c07f4fa89f59179d42965af3b1b0b88ce2baf3024L21-R21) [[3]](diffhunk://#diff-066935b5ba09d1a7e26efc9c07f4fa89f59179d42965af3b1b0b88ce2baf3024L33-R40) ### Function Renaming for Consistency: * [`src/functions/public/Functions/Get-ASTFunctionAlias.ps1`](diffhunk://#diff-1df2456a77c20bca12ec99f422e6965edae54128f290dcc749be6036c6823be0L1-R1): Renamed the function from `Get-ASTFunctionAlias` to `Get-AstFunctionAlias` and updated all references accordingly. [[1]](diffhunk://#diff-1df2456a77c20bca12ec99f422e6965edae54128f290dcc749be6036c6823be0L1-R1) [[2]](diffhunk://#diff-1df2456a77c20bca12ec99f422e6965edae54128f290dcc749be6036c6823be0L13-R13) [[3]](diffhunk://#diff-1df2456a77c20bca12ec99f422e6965edae54128f290dcc749be6036c6823be0L25-R25) [[4]](diffhunk://#diff-1df2456a77c20bca12ec99f422e6965edae54128f290dcc749be6036c6823be0L43-R43) [[5]](diffhunk://#diff-1df2456a77c20bca12ec99f422e6965edae54128f290dcc749be6036c6823be0L81-R89) * [`src/functions/public/Functions/Get-ASTFunctionName.ps1`](diffhunk://#diff-4653cd432446aa25615ea39c8651d548676676a14800c88eb0b438b939674170L1-R12): Renamed the function from `Get-ASTFunctionName` to `Get-AstFunctionName` and updated all references accordingly. [[1]](diffhunk://#diff-4653cd432446aa25615ea39c8651d548676676a14800c88eb0b438b939674170L1-R12) [[2]](diffhunk://#diff-4653cd432446aa25615ea39c8651d548676676a14800c88eb0b438b939674170L23-R23) [[3]](diffhunk://#diff-4653cd432446aa25615ea39c8651d548676676a14800c88eb0b438b939674170L33-R33) [[4]](diffhunk://#diff-4653cd432446aa25615ea39c8651d548676676a14800c88eb0b438b939674170L51-R51) [[5]](diffhunk://#diff-4653cd432446aa25615ea39c8651d548676676a14800c88eb0b438b939674170L90-R98) * [`src/functions/public/Functions/Get-ASTFunctionType.ps1`](diffhunk://#diff-6f1880148021050f019b08d8e8c20da44a4e8402258091263d4893dee7ef9a7aL1-R12): Renamed the function from `Get-ASTFunctionType` to `Get-AstFunctionType` and updated all references accordingly. [[1]](diffhunk://#diff-6f1880148021050f019b08d8e8c20da44a4e8402258091263d4893dee7ef9a7aL1-R12) [[2]](diffhunk://#diff-6f1880148021050f019b08d8e8c20da44a4e8402258091263d4893dee7ef9a7aL25-R25) [[3]](diffhunk://#diff-6f1880148021050f019b08d8e8c20da44a4e8402258091263d4893dee7ef9a7aL43-R43) [[4]](diffhunk://#diff-6f1880148021050f019b08d8e8c20da44a4e8402258091263d4893dee7ef9a7aL82-R89) * [`src/functions/public/Lines/Get-ASTLineComment.ps1`](diffhunk://#diff-7ef05603786634e7546e1c5d47e915c2067024af002b4d0532eed1ab6c010bc1L1-R1): Renamed the filter from `Get-ASTLineComment` to `Get-AstLineComment` and updated all references accordingly. [[1]](diffhunk://#diff-7ef05603786634e7546e1c5d47e915c2067024af002b4d0532eed1ab6c010bc1L1-R1) [[2]](diffhunk://#diff-7ef05603786634e7546e1c5d47e915c2067024af002b4d0532eed1ab6c010bc1L12-R12) [[3]](diffhunk://#diff-7ef05603786634e7546e1c5d47e915c2067024af002b4d0532eed1ab6c010bc1L29-R29) * [`src/functions/public/Scripts/Get-ASTScriptCommand.ps1`](diffhunk://#diff-9207269684f85ef8ff0eae5ea46c0eedac65cd4891d0a01c21852fdecfadc9bbL1-R1): Renamed the function from `Get-ASTScriptCommand` to `Get-AstScriptCommand` and updated all references accordingly. [[1]](diffhunk://#diff-9207269684f85ef8ff0eae5ea46c0eedac65cd4891d0a01c21852fdecfadc9bbL1-R1) [[2]](diffhunk://#diff-9207269684f85ef8ff0eae5ea46c0eedac65cd4891d0a01c21852fdecfadc9bbL12-R22) ## Type of change <!-- Use the check-boxes [x] on the options that are relevant. --> - [ ] 📖 [Docs] - [ ] 🪲 [Fix] - [x] 🩹 [Patch] - [ ] ⚠️ [Security fix] - [ ] 🚀 [Feature] - [ ] 🌟 [Breaking change] ## Checklist <!-- Use the check-boxes [x] on the options that are relevant. --> - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas
1 parent 34d0ae1 commit b5e77ed

8 files changed

Lines changed: 55 additions & 55 deletions

File tree

src/functions/public/Core/Get-ASTCommand.ps1

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
function Get-AstCommand {
22
<#
33
.SYNOPSIS
4-
Retrieves command AST (Abstract Syntax Tree) elements from a PowerShell script or AST object.
4+
Retrieves command Ast (Abstract Syntax Tree) elements from a PowerShell script or Ast object.
55
66
.DESCRIPTION
7-
This function extracts and returns command AST elements from a specified PowerShell script file,
8-
script content, or an existing AST object. The function supports multiple input methods, including
9-
direct script text, file paths, or existing AST objects. It also provides an option to search nested
7+
This function extracts and returns command Ast elements from a specified PowerShell script file,
8+
script content, or an existing Ast object. The function supports multiple input methods, including
9+
direct script text, file paths, or existing Ast objects. It also provides an option to search nested
1010
functions and script block expressions.
1111
1212
.EXAMPLE
@@ -19,7 +19,7 @@
1919
Errors : {}
2020
```
2121
22-
Parses the specified script file and extracts command AST elements.
22+
Parses the specified script file and extracts command Ast elements.
2323
2424
.EXAMPLE
2525
Get-AstCommand -Script "Get-Process; Write-Host 'Hello'"
@@ -31,7 +31,7 @@
3131
Errors : {}
3232
```
3333
34-
Parses the provided script content and extracts command AST elements.
34+
Parses the provided script content and extracts command Ast elements.
3535
3636
.EXAMPLE
3737
$ast = [System.Management.Automation.Language.Parser]::ParseInput("Get-Process", [ref]$null, [ref]$null)
@@ -44,13 +44,13 @@
4444
Errors : {}
4545
```
4646
47-
Extracts command AST elements from a manually parsed AST object.
47+
Extracts command Ast elements from a manually parsed Ast object.
4848
4949
.OUTPUTS
5050
PSCustomObject
5151
5252
.NOTES
53-
Returns an object containing extracted AST elements, tokens, and errors.
53+
Returns an object containing extracted Ast elements, tokens, and errors.
5454
5555
.LINK
5656
https://psmodule.io/Ast/Functions/Core/Get-AstCommand/
@@ -80,7 +80,7 @@
8080
)]
8181
[string] $Script,
8282

83-
# An existing AST object to search.
83+
# An existing Ast object to search.
8484
[Parameter(
8585
Mandatory,
8686
ValueFromPipeline,

src/functions/public/Core/Get-ASTFunction.ps1

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
function Get-AstFunction {
22
<#
33
.SYNOPSIS
4-
Retrieves function definitions from a PowerShell script or AST.
4+
Retrieves function definitions from a PowerShell script or Ast.
55
66
.DESCRIPTION
77
This function extracts function definitions from a given PowerShell script file, script content,
8-
or an existing AST (Abstract Syntax Tree) object. It supports searching by function name
8+
or an existing Ast (Abstract Syntax Tree) object. It supports searching by function name
99
and can optionally search within nested functions and script block expressions.
1010
1111
.EXAMPLE
@@ -43,13 +43,13 @@
4343
Errors : {}
4444
```
4545
46-
Extracts function definitions from an existing AST object.
46+
Extracts function definitions from an existing Ast object.
4747
4848
.OUTPUTS
4949
PSCustomObject
5050
5151
.NOTES
52-
Contains AST objects, tokenized script content, and parsing errors if any.
52+
Contains Ast objects, tokenized script content, and parsing errors if any.
5353
5454
.LINK
5555
https://psmodule.io/Ast/Functions/Core/Get-AstFunction
@@ -79,7 +79,7 @@
7979
)]
8080
[string] $Script,
8181

82-
# An existing AST object to search.
82+
# An existing Ast object to search.
8383
[Parameter(
8484
Mandatory,
8585
ValueFromPipeline,

src/functions/public/Core/Get-ASTScript.ps1

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
function Get-AstScript {
22
<#
33
.SYNOPSIS
4-
Parses a PowerShell script or script file and returns its abstract syntax tree (AST).
4+
Parses a PowerShell script or script file and returns its abstract syntax tree (Ast).
55
66
.DESCRIPTION
7-
The Get-AstScript function parses a PowerShell script or script file and returns its abstract syntax tree (AST),
7+
The Get-AstScript function parses a PowerShell script or script file and returns its abstract syntax tree (Ast),
88
along with tokens and errors encountered during parsing. This function can be used to analyze the structure
99
of a script by specifying either the script content directly or the path to a script file.
1010
@@ -18,7 +18,7 @@
1818
Errors : {Error1, Error2, ...}
1919
```
2020
21-
Parses the PowerShell script located at "C:\\Scripts\\example.ps1" and returns its AST, tokens, and any parsing errors.
21+
Parses the PowerShell script located at "C:\\Scripts\\example.ps1" and returns its Ast, tokens, and any parsing errors.
2222
2323
.EXAMPLE
2424
Get-AstScript -Script "Write-Host 'Hello World'"
@@ -30,14 +30,14 @@
3030
Errors : {}
3131
```
3232
33-
Parses the provided PowerShell script string and returns its AST, tokens, and any parsing errors.
33+
Parses the provided PowerShell script string and returns its Ast, tokens, and any parsing errors.
3434
3535
.OUTPUTS
3636
PSCustomObject
3737
3838
.NOTES
3939
The returned custom object contains the following properties:
40-
- `Ast` - [System.Management.Automation.Language.ScriptBlockAst]. The abstract syntax tree (AST) of the parsed script.
40+
- `Ast` - [System.Management.Automation.Language.ScriptBlockAst]. The abstract syntax tree (Ast) of the parsed script.
4141
- `Tokens` - [System.Management.Automation.Language.Token[]]. The tokens generated during parsing.
4242
- `Errors` - [System.Management.Automation.Language.ParseError[]]. Any parsing errors encountered.
4343

src/functions/public/Functions/Get-ASTFunctionAlias.ps1

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function Get-ASTFunctionAlias {
1+
function Get-AstFunctionAlias {
22
<#
33
.SYNOPSIS
44
Retrieves function aliases from a PowerShell script or file.
@@ -10,7 +10,7 @@
1010
within nested functions and script blocks.
1111
1212
.EXAMPLE
13-
Get-ASTFunctionAlias -Path "C:\Scripts\MyScript.ps1" -Name "Get-User"
13+
Get-AstFunctionAlias -Path "C:\Scripts\MyScript.ps1" -Name "Get-User"
1414
1515
Output:
1616
```powershell
@@ -22,7 +22,7 @@
2222
Retrieves aliases assigned to the function `Get-User` within the specified script file.
2323
2424
.EXAMPLE
25-
Get-ASTFunctionAlias -Script $scriptContent -Recurse
25+
Get-AstFunctionAlias -Script $scriptContent -Recurse
2626
2727
Output:
2828
```powershell
@@ -40,7 +40,7 @@
4040
An object containing the function name and its associated aliases.
4141
4242
.LINK
43-
https://psmodule.io/AST/Functions/Functions/Get-ASTFunctionAlias
43+
https://psmodule.io/Ast/Functions/Functions/Get-AstFunctionAlias
4444
#>
4545
[CmdletBinding()]
4646
param (
@@ -78,15 +78,15 @@
7878
process {
7979
switch ($PSCmdlet.ParameterSetName) {
8080
'Path' {
81-
$functionAST = Get-ASTFunction -Name $Name -Path $Path -Recurse:$Recurse
81+
$functionAst = Get-AstFunction -Name $Name -Path $Path -Recurse:$Recurse
8282
}
8383
'Script' {
84-
$functionAST = Get-ASTFunction -Name $Name -Script $Script -Recurse:$Recurse
84+
$functionAst = Get-AstFunction -Name $Name -Script $Script -Recurse:$Recurse
8585
}
8686
}
8787

8888
# Process each function and extract aliases
89-
$functionAST.Ast | ForEach-Object {
89+
$functionAst.Ast | ForEach-Object {
9090
$funcName = $_.Name
9191
$funcAttributes = $_.Body.FindAll({ $args[0] -is [System.Management.Automation.Language.AttributeAst] }, $true) | Where-Object {
9292
$_.Parent -is [System.Management.Automation.Language.ParamBlockAst]

src/functions/public/Functions/Get-ASTFunctionName.ps1

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
function Get-ASTFunctionName {
1+
function Get-AstFunctionName {
22
<#
33
.SYNOPSIS
4-
Retrieves the names of functions from an abstract syntax tree (AST) in a PowerShell script.
4+
Retrieves the names of functions from an abstract syntax tree (Ast) in a PowerShell script.
55
66
.DESCRIPTION
7-
Parses a PowerShell script file or script content to extract function names using an abstract syntax tree (AST).
7+
Parses a PowerShell script file or script content to extract function names using an abstract syntax tree (Ast).
88
The function supports searching by name, parsing from a file path, or directly from a script string. It can also
99
search within nested functions and script block expressions when the -Recurse switch is used.
1010
1111
.EXAMPLE
12-
Get-ASTFunctionName -Path "C:\Scripts\example.ps1"
12+
Get-AstFunctionName -Path "C:\Scripts\example.ps1"
1313
1414
Output:
1515
```powershell
@@ -20,7 +20,7 @@
2020
Extracts function names from the specified PowerShell script file.
2121
2222
.EXAMPLE
23-
Get-ASTFunctionName -Script "function Test-Function { param($x) Write-Host $x }"
23+
Get-AstFunctionName -Script "function Test-Function { param($x) Write-Host $x }"
2424
2525
Output:
2626
```powershell
@@ -30,7 +30,7 @@
3030
Extracts function names from the given script string.
3131
3232
.EXAMPLE
33-
Get-ASTFunctionName -Path "C:\Scripts\example.ps1" -Recurse
33+
Get-AstFunctionName -Path "C:\Scripts\example.ps1" -Recurse
3434
3535
Output:
3636
```powershell
@@ -48,7 +48,7 @@
4848
The name of each function found in the PowerShell script.
4949
5050
.LINK
51-
https://psmodule.io/AST/Functions/Functions/Get-ASTFunctionName/
51+
https://psmodule.io/Ast/Functions/Functions/Get-AstFunctionName/
5252
#>
5353

5454
[CmdletBinding()]
@@ -87,15 +87,15 @@
8787
process {
8888
switch ($PSCmdlet.ParameterSetName) {
8989
'Path' {
90-
$functionAST = Get-ASTFunction -Name $Name -Path $Path -Recurse:$Recurse
90+
$functionAst = Get-AstFunction -Name $Name -Path $Path -Recurse:$Recurse
9191
}
9292
'Script' {
93-
$functionAST = Get-ASTFunction -Name $Name -Script $Script -Recurse:$Recurse
93+
$functionAst = Get-AstFunction -Name $Name -Script $Script -Recurse:$Recurse
9494
}
9595
}
9696

9797
# Process each function and extract the name
98-
$functionAST.Ast | ForEach-Object {
98+
$functionAst.Ast | ForEach-Object {
9999
$_.Name
100100
}
101101
}

src/functions/public/Functions/Get-ASTFunctionType.ps1

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
function Get-ASTFunctionType {
1+
function Get-AstFunctionType {
22
<#
33
.SYNOPSIS
4-
Retrieves the type of an abstract syntax tree (AST) function.
4+
Retrieves the type of an abstract syntax tree (Ast) function.
55
66
.DESCRIPTION
77
Parses a PowerShell script file or script content to determine the type of function present.
88
The function classifies functions as `Function`, `Filter`, `Workflow`, or `Configuration`.
99
It supports searching for specific function names and can process nested functions if required.
1010
1111
.EXAMPLE
12-
Get-ASTFunctionType -Path "C:\Scripts\MyScript.ps1"
12+
Get-AstFunctionType -Path "C:\Scripts\MyScript.ps1"
1313
1414
Output:
1515
```powershell
@@ -22,7 +22,7 @@
2222
Parses the specified script file and identifies function types.
2323
2424
.EXAMPLE
25-
Get-ASTFunctionType -Script "function Test { param() Write-Output 'Hello' }"
25+
Get-AstFunctionType -Script "function Test { param() Write-Output 'Hello' }"
2626
2727
Output:
2828
```powershell
@@ -40,7 +40,7 @@
4040
Represents the function name and its determined type.
4141
4242
.LINK
43-
https://psmodule.io/AST/Functions/Functions/Get-ASTFunctionType/
43+
https://psmodule.io/Ast/Functions/Functions/Get-AstFunctionType/
4444
#>
4545
[OutputType([pscustomobject])]
4646
[CmdletBinding()]
@@ -79,14 +79,14 @@
7979
process {
8080
switch ($PSCmdlet.ParameterSetName) {
8181
'Path' {
82-
$functionAST = Get-ASTFunction -Name $Name -Path $Path -Recurse:$Recurse
82+
$functionAst = Get-AstFunction -Name $Name -Path $Path -Recurse:$Recurse
8383
}
8484
'Script' {
85-
$functionAST = Get-ASTFunction -Name $Name -Script $Script -Recurse:$Recurse
85+
$functionAst = Get-AstFunction -Name $Name -Script $Script -Recurse:$Recurse
8686
}
8787
}
8888

89-
$functionAST.Ast | ForEach-Object {
89+
$functionAst.Ast | ForEach-Object {
9090
$type = if ($_.IsWorkflow) {
9191
'Workflow'
9292
} elseif ($_.IsConfiguration) {

src/functions/public/Lines/Get-ASTLineComment.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
filter Get-ASTLineComment {
1+
filter Get-AstLineComment {
22
<#
33
.SYNOPSIS
44
Extracts comment tokens from a given line of PowerShell code.
@@ -9,7 +9,7 @@
99
the specified kind, defaulting to 'Comment'.
1010
1111
.EXAMPLE
12-
"# This is a comment" | Get-ASTLineComment
12+
"# This is a comment" | Get-AstLineComment
1313
1414
Output:
1515
```powershell
@@ -26,7 +26,7 @@
2626
An array of tokens representing comments extracted from the input line.
2727
2828
.LINK
29-
https://psmodule.io/AST/Functions/Lines/Get-ASTLineComment/
29+
https://psmodule.io/Ast/Functions/Lines/Get-AstLineComment/
3030
#>
3131
[OutputType([System.Management.Automation.Language.Token[]])]
3232
[CmdletBinding()]

src/functions/public/Scripts/Get-ASTScriptCommand.ps1

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function Get-ASTScriptCommand {
1+
function Get-AstScriptCommand {
22
<#
33
.SYNOPSIS
44
Retrieves the commands used within a specified PowerShell script.
@@ -9,17 +9,17 @@
99
Returns details such as command name, position, and file reference.
1010
1111
.EXAMPLE
12-
Get-ASTScriptCommand -Path "C:\Scripts\example.ps1"
12+
Get-AstScriptCommand -Path "C:\Scripts\example.ps1"
1313
1414
Extracts and lists all commands found in the specified PowerShell script.
1515
1616
.EXAMPLE
17-
Get-ASTScriptCommand -Path "C:\Scripts\example.ps1" -IncludeCallOperators
17+
Get-AstScriptCommand -Path "C:\Scripts\example.ps1" -IncludeCallOperators
1818
1919
Extracts all commands, including those executed with call operators (& and .).
2020
2121
.LINK
22-
https://psmodule.io/AST/Functions/Scripts/Get-ASTScriptCommand/
22+
https://psmodule.io/Ast/Functions/Scripts/Get-AstScriptCommand/
2323
#>
2424
[CmdletBinding(DefaultParameterSetName = 'Ast')]
2525
param (
@@ -46,7 +46,7 @@
4646
)]
4747
[string] $Script,
4848

49-
# An existing AST object to search.
49+
# An existing Ast object to search.
5050
[Parameter(
5151
Mandatory,
5252
ValueFromPipeline,
@@ -81,13 +81,13 @@
8181
}
8282

8383
# Gather CommandAsts
84-
$commandAST = $scriptAst.FindAll({ $args[0] -is [System.Management.Automation.Language.CommandAst] }, $Recurse)
84+
$commandAst = $scriptAst.FindAll({ $args[0] -is [System.Management.Automation.Language.CommandAst] }, $Recurse)
8585

8686
if (-not $IncludeCallOperators) {
87-
$commandAST = $commandAST | Where-Object { $_.InvocationOperator -notin 'Ampersand', 'Dot' }
87+
$commandAst = $commandAst | Where-Object { $_.InvocationOperator -notin 'Ampersand', 'Dot' }
8888
}
8989

90-
$commandAST | ForEach-Object {
90+
$commandAst | ForEach-Object {
9191
$invocationOperator = switch ($_.InvocationOperator) {
9292
'Ampersand' { '&' }
9393
'Dot' { '.' }

0 commit comments

Comments
 (0)