Skip to content

Commit

Permalink
feat: Porting TOML Template to Language Function (Fixes #628)
Browse files Browse the repository at this point in the history
  • Loading branch information
James Brundage committed Nov 12, 2023
2 parents b3e080e + 9f88af2 commit ccab409
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 3 deletions.
60 changes: 60 additions & 0 deletions docs/Language.TCL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
Language.TCL
------------




### Synopsis
TCL/TK Template Transpiler.



---


### Description

Allows PipeScript to generate TCL or TK.
Because TCL Scripts only allow single-line comments, this is done using a pair of comment markers.
# { or # PipeScript{ begins a PipeScript block
# } or # }PipeScript ends a PipeScript block
~~~tcl
# {
Uncommented lines between these two points will be ignored
# # Commented lines will become PipeScript / PowerShell.
# param($message = "hello world")
# "puts `"$message`""
# }
~~~



---


### Examples
> EXAMPLE 1
```PowerShell
Invoke-PipeScript {
$tclScript = '
# {
Uncommented lines between these two points will be ignored
# # Commented lines will become PipeScript / PowerShell.
# param($message = "hello world")
# "puts `"$message`""
# }
'
[OutputFile('.\HelloWorld.ps1.tcl')]$tclScript
}
Invoke-PipeScript .\HelloWorld.ps1.tcl
```


---


### Syntax
```PowerShell
Language.TCL [<CommonParameters>]
```
1 change: 0 additions & 1 deletion docs/ListOfTranspilers.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ These are all of the transpilers currently included in PipeScript:
|[RenameVariable](Transpilers/RenameVariable.psx.ps1) |Renames variables |
|[Requires](Transpilers/Keywords/Requires.psx.ps1) |requires one or more modules, variables, or types.|
|[Rest](Transpilers/Rest.psx.ps1) |Generates PowerShell to talk to a REST api. |
|[TCL.Template](Transpilers/Templates/TCL.Template.psx.ps1) |TCL/TK Template Transpiler. |
|[TOML.Template](Transpilers/Templates/TOML.Template.psx.ps1) |TOML Template Transpiler. |
|[TypeScript.Template](Transpilers/Templates/TypeScript.Template.psx.ps1) |TypeScript Template Transpiler. |
|[Until](Transpilers/Keywords/Until.psx.ps1) |until keyword |
Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Often, programming involves implementing small functional changes within a speci

For example, if implementing an interface or subclass, the only things that will change are the class name and method details.

PipeScript can be be embedded within 8 languages.
PipeScript can be be embedded within 7 languages.

Embedding PipeScript within any of these languages allows you to generate any of these languages with parameterized scripts, thus removing some of the tedium of programming.

Expand Down
1 change: 0 additions & 1 deletion docs/SupportedLanguages.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ These are all of the transpilers currently included in PipeScript:
|Language |Synopsis |Pattern |
|--------------------------------------------------------------------------|--------------------------------|-----------------------|
|[Python.Template](Transpilers/Templates/Python.Template.psx.ps1) |Python Template Transpiler. |```\.py$``` |
|[TCL.Template](Transpilers/Templates/TCL.Template.psx.ps1) |TCL/TK Template Transpiler. |```\.t(?>cl\\|k)$``` |
|[TOML.Template](Transpilers/Templates/TOML.Template.psx.ps1) |TOML Template Transpiler. |```\.toml$``` |
|[TypeScript.Template](Transpilers/Templates/TypeScript.Template.psx.ps1) |TypeScript Template Transpiler. |```\.tsx{0,1}``` |
|[WebAssembly.Template](Transpilers/Templates/WebAssembly.Template.psx.ps1)|WebAssembly Template Transpiler.|```\.wat$``` |
Expand Down

0 comments on commit ccab409

Please sign in to comment.