|
1 | | -This directory and it's subdirectories contain additional language keywords within PipeScript. |
| 1 | +# PipeScript Keywords |
2 | 2 |
|
3 | | -Most keywords will be implemented as a Transpiler that tranforms a CommandAST. |
| 3 | +PipeScript contains several new language keywords that are not found in PowerShell. |
4 | 4 |
|
| 5 | +This directory contains the implementations of PipeScript language keywords. |
5 | 6 |
|
6 | | -|DisplayName |Synopsis | |
7 | | -|------------------------|--------------------------------| |
8 | | -|[Assert](Assert.psx.ps1)|[Assert keyword](Assert.psx.ps1)| |
9 | | -|[New](New.psx.ps1) |['new' keyword](New.psx.ps1) | |
10 | | -|[Until](Until.psx.ps1) |[until keyword](Until.psx.ps1) | |
| 7 | +## Keyword List |
11 | 8 |
|
12 | 9 |
|
| 10 | +|DisplayName |Synopsis | |
| 11 | +|------------------------|-----------------------------------------------| |
| 12 | +|[Assert](Assert.psx.ps1)|[Assert keyword](Assert.psx.ps1) | |
| 13 | +|[Await](Await.psx.ps1) |[awaits asynchronous operations](Await.psx.ps1)| |
| 14 | +|[New](New.psx.ps1) |['new' keyword](New.psx.ps1) | |
| 15 | +|[Until](Until.psx.ps1) |[until keyword](Until.psx.ps1) | |
13 | 16 |
|
14 | 17 |
|
| 18 | + |
| 19 | +# Examples |
| 20 | + |
15 | 21 | ## Assert Example 1 |
16 | 22 |
|
17 | 23 |
|
@@ -72,6 +78,24 @@ Most keywords will be implemented as a Transpiler that tranforms a CommandAST. |
72 | 78 | } -Debug |
73 | 79 | ~~~ |
74 | 80 |
|
| 81 | +## Await Example 1 |
| 82 | + |
| 83 | + |
| 84 | +~~~PowerShell |
| 85 | + .>PipeScript -ScriptBlock { |
| 86 | + await $Websocket.SendAsync($SendSegment, 'Binary', $true, [Threading.CancellationToken]::new($false)) |
| 87 | + } |
| 88 | +~~~ |
| 89 | + |
| 90 | +## Await Example 2 |
| 91 | + |
| 92 | + |
| 93 | +~~~PowerShell |
| 94 | + .>PipeScript -ScriptBlock { |
| 95 | + $receiveResult = await $Websocket.ReceiveAsync($receiveSegment, [Threading.CancellationToken]::new($false)) |
| 96 | + } |
| 97 | +~~~ |
| 98 | + |
75 | 99 | ## New Example 1 |
76 | 100 |
|
77 | 101 |
|
@@ -212,3 +236,7 @@ Most keywords will be implemented as a Transpiler that tranforms a CommandAST. |
212 | 236 | } |
213 | 237 | ~~~ |
214 | 238 |
|
| 239 | + |
| 240 | + |
| 241 | +Keywords will generally be implemented as a Transpiler that tranforms a CommandAST. |
| 242 | + |
0 commit comments