Skip to content

Commit 693c3b2

Browse files
author
James Brundage
committed
Cleaning up Core Inline Transpiler (#111)
1 parent ec0f50a commit 693c3b2

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed

Transpilers/Core/PipeScript.Inline.psx.ps1

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,11 @@
1313
param(
1414

1515
# A string containing the text contents of the file
16-
[Parameter(Mandatory,ParameterSetName='SourceTextAndPattern')]
1716
[Parameter(Mandatory,ParameterSetName='SourceTextReplace')]
1817
[Parameter(Mandatory,ParameterSetName='SourceStartAndEnd')]
1918
[string]
2019
$SourceText,
2120

22-
# A string containing the pattern used to recognize special sections of source code.
23-
[Parameter(Mandatory,ParameterSetName='SourceTextAndPattern')]
24-
[regex]
25-
$SourcePattern,
26-
27-
2821
[Parameter(Mandatory,ParameterSetName='SourceTextReplace')]
2922
[Alias('Replace')]
3023
[ValidateScript({
@@ -60,49 +53,39 @@ $EndPattern,
6053
$ReplacementEvaluator,
6154

6255
# If set, will not transpile script blocks.
63-
[Parameter(ParameterSetName='SourceTextAndPattern')]
64-
[Parameter(ParameterSetName='SourceSections')]
6556
[Parameter(ParameterSetName='SourceStartAndEnd')]
6657
[Parameter(ParameterSetName='SourceTextReplace')]
6758
[switch]
6859
$NoTranspile,
6960

7061
# The path to the source file.
71-
[Parameter(ParameterSetName='SourceTextAndPattern')]
72-
[Parameter(ParameterSetName='SourceSections')]
7362
[Parameter(ParameterSetName='SourceTextReplace')]
7463
[Parameter(ParameterSetName='SourceStartAndEnd')]
7564
[string]
7665
$SourceFile,
7766

7867
# A Script Block that will be injected before each inline is run.
79-
[Parameter(ParameterSetName='SourceTextAndPattern')]
80-
[Parameter(ParameterSetName='SourceSections')]
8168
[Parameter(ParameterSetName='SourceTextReplace')]
8269
[Parameter(ParameterSetName='SourceStartAndEnd')]
8370
[ScriptBlock]
8471
$Begin,
8572

8673
# A Script Block that will be piped to after each output.
87-
[Parameter(ParameterSetName='SourceTextAndPattern')]
88-
[Parameter(ParameterSetName='SourceSections')]
8974
[Parameter(ParameterSetName='SourceTextReplace')]
9075
[Parameter(ParameterSetName='SourceStartAndEnd')]
9176
[Alias('Process')]
9277
[ScriptBlock]
9378
$ForeachObject,
9479

9580
# A Script Block that will be injected after each inline script is run.
96-
[Parameter(ParameterSetName='SourceTextAndPattern')]
97-
[Parameter(ParameterSetName='SourceSections')]
9881
[Parameter(ParameterSetName='SourceTextReplace')]
9982
[Parameter(ParameterSetName='SourceStartAndEnd')]
10083
[ScriptBlock]
10184
$End
10285
)
10386

10487
begin {
105-
$allSections = @()
88+
10689
}
10790

10891
process {

0 commit comments

Comments
 (0)