Skip to content

Commit 6f577b9

Browse files
StartAutomatingStartAutomating
authored andcommitted
Adding Piped Assignment Transpiler (#88)
1 parent 6980dea commit 6f577b9

File tree

1 file changed

+25
-3
lines changed

1 file changed

+25
-3
lines changed

Transpilers/Syntax/README.md

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,35 @@
11
This directory and it's subdirectories contain syntax changes that enable common programming scenarios in PowerShell and PipeScript.
22

33

4-
|DisplayName |Synopsis |
5-
|------------------------------------|------------------------------------------------|
6-
|[RegexLiteral](RegexLiteral.psx.ps1)|[Regex Literal Transpiler](RegexLiteral.psx.ps1)|
4+
|DisplayName |Synopsis |
5+
|------------------------------------------|------------------------------------------------------|
6+
|[PipedAssignment](PipedAssignment.psx.ps1)|[Piped Assignment Transpiler](PipedAssignment.psx.ps1)|
7+
|[RegexLiteral](RegexLiteral.psx.ps1) |[Regex Literal Transpiler](RegexLiteral.psx.ps1) |
78

89

910

1011

12+
## PipedAssignment Example 1
13+
14+
15+
~~~PowerShell
16+
{
17+
$Collection |=| Where-Object Name -match $Pattern
18+
} | .>PipeScript
19+
20+
# This will become:
21+
22+
$Collection = $Collection | Where-Object Name -match $pattern
23+
~~~
24+
25+
## PipedAssignment Example 2
26+
27+
28+
~~~PowerShell
29+
{
30+
$Collection |=| Where-Object Name -match $Pattern | Foreach-Object { $_
31+
~~~
32+
1133
## RegexLiteral Example 1
1234

1335

0 commit comments

Comments
 (0)