-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Porting Haxe Template to Language Function (Fixes #599)
- Loading branch information
James Brundage
committed
Nov 11, 2023
1 parent
30a5776
commit f85b647
Showing
2 changed files
with
30 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
Language function Haxe { | ||
<# | ||
.SYNOPSIS | ||
Haxe Template Transpiler. | ||
.DESCRIPTION | ||
Allows PipeScript to generate Haxe. | ||
Multiline comments with /*{}*/ will be treated as blocks of PipeScript. | ||
Multiline comments can be preceeded or followed by 'empty' syntax, which will be ignored. | ||
The Haxe Inline Transpiler will consider the following syntax to be empty: | ||
* ```null``` | ||
* ```""``` | ||
* ```''``` | ||
#> | ||
[ValidatePattern('\.hx$')] | ||
param( | ||
) | ||
|
||
# We start off by declaring a number of regular expressions: | ||
$startComment = '/\*' # * Start Comments ```\*``` | ||
$endComment = '\*/' # * End Comments ```/*``` | ||
$Whitespace = '[\s\n\r]{0,}' | ||
# * IgnoredContext ```String.empty```, ```null```, blank strings and characters | ||
$IgnoredContext = "(?<ignore>(?>$("null", '""', "''" -join '|'))\s{0,}){0,1}" | ||
$StartPattern = "(?<PSStart>${IgnoredContext}${startComment}\{$Whitespace)" | ||
$EndPattern = "(?<PSEnd>$Whitespace\}${endComment}\s{0,}${IgnoredContext})" | ||
} |
This file was deleted.
Oops, something went wrong.