Skip to content

Commit

Permalink
feat: Porting Rust Template Transpiler to Language Function (Fixes #623)
Browse files Browse the repository at this point in the history
  • Loading branch information
James Brundage committed Nov 11, 2023
1 parent fa2fefc commit 7a503ab
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 121 deletions.
21 changes: 21 additions & 0 deletions Commands/Languages/Rust/Rust-Language.ps.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Language function Rust {
<#
.SYNOPSIS
Rust Language Definition
.DESCRIPTION
Defines Rust within PipeScript.
This allows Rust to be templated.
#>
[ValidatePattern('\.rs$')]
param()

# We start off by declaring a number of regular expressions:
$startComment = '/\*' # * Start Comments ```\*```
$endComment = '\*/' # * End Comments ```/*```
$Whitespace = '[\s\n\r]{0,}'
# * StartRegex ```$IgnoredContext + $StartComment + '{' + $Whitespace```
$startRegex = "(?<PSStart>${startComment}\{$Whitespace)"
# * EndRegex ```$whitespace + '}' + $EndComment + $ignoredContext```
$endRegex = "(?<PSEnd>$Whitespace\}${endComment})"
}
121 changes: 0 additions & 121 deletions Transpilers/Templates/Rust.Template.psx.ps1

This file was deleted.

0 comments on commit 7a503ab

Please sign in to comment.