File tree Expand file tree Collapse file tree 1 file changed +15
-19
lines changed
Expand file tree Collapse file tree 1 file changed +15
-19
lines changed Original file line number Diff line number Diff line change 1- This directory and it's subdirectories contain additional language keywords within PipeScript .
1+ This directory contains Inline PipeScript transpilers for several languages .
22
3- Most keywords will be implemented as a Transpiler that tranforms a CommandAST.
3+ PipeScript can currently be embedded in ``` .>{@(Get-Transpiler -TranspilerPath $pwd).Count}<. ``` languages or file types.
4+
5+ Transpilers in this directory should be named ``` Inline.NameOfLanguage.psx.ps1 ``` .
6+ Each file should handle one and only one language (better explicit than terse).
7+
8+ Transpilers should call ``` .>PipeScript.Inline ``` to simplify and standarize processing.
49
510~~~ PipeScript{
611 [PSCustomObject]@{
712 Table = Get-Transpiler -TranspilerPath $pwd |
8- Select-Object DisplayName, Synopsis, @{
13+ Select-Object @{
14+ Name='Language'
15+ Expression= {$_.DisplayName -replace '^Inline\.'}
16+ }, @{
17+ Name='Synopsis'
18+ Expression= { $_.Synopsis -replace '[\s\r\n]+$' }
19+ }, @{
920 Name='Link'
1021 Expression = { $_.Name }
1122 }
12- }}
13- ~~~
14-
15-
16- ~~~ PipeScript{
17- @(foreach ($transpiler in Get-Transpiler -TranspilerPath $pwd) {
18- $examples = @($transpiler.Examples)
19- if (-not $examples) { continue }
20- for ($exampleNumber = 1; $exampleNumber -le $examples.Length; $exampleNumber++) {
21- @("## $($transpiler.DisplayName) Example $($exampleNumber)",
22- [Environment]::Newline,
23- "~~~PowerShell",
24- $examples[$exampleNumber - 1],
25- "~~~") -join [Environment]::Newline
26- }
27- }) -join ([Environment]::Newline * 2)
23+ }
2824}
2925~~~
You can’t perform that action at this time.
0 commit comments