Skip to content

Commit 8247135

Browse files
StartAutomatingStartAutomating
authored andcommitted
Updating Keywords README.ps1.md
1 parent 2aef298 commit 8247135

File tree

1 file changed

+35
-7
lines changed

1 file changed

+35
-7
lines changed

Transpilers/Keywords/README.md

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
1-
This directory and it's subdirectories contain additional language keywords within PipeScript.
1+
# PipeScript Keywords
22

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.
44

5+
This directory contains the implementations of PipeScript language keywords.
56

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
118

129

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) |
1316

1417

18+
19+
# Examples
20+
1521
## Assert Example 1
1622

1723

@@ -72,6 +78,24 @@ Most keywords will be implemented as a Transpiler that tranforms a CommandAST.
7278
} -Debug
7379
~~~
7480

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+
7599
## New Example 1
76100

77101

@@ -212,3 +236,7 @@ Most keywords will be implemented as a Transpiler that tranforms a CommandAST.
212236
}
213237
~~~
214238

239+
240+
241+
Keywords will generally be implemented as a Transpiler that tranforms a CommandAST.
242+

0 commit comments

Comments
 (0)