Setup codegen metaprogram skeleton

Going use it to swap macro implementation usage in the compiler.
This commit is contained in:
2024-05-04 15:23:33 -04:00
parent fa82547705
commit 1c633f7306
20 changed files with 46544 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
# format_cpp.psm1
function format-cpp
{
param( $path, $include, $exclude )
# Format generated gencpp
Write-Host "Beginning format"
$formatParams = @(
'-i' # In-place
'-style=file:.clang-format'
'-verbose'
)
$targetFiles = @(
Get-ChildItem -Recurse -Path $path -Include $include -Exclude $exclude
| Select-Object -ExpandProperty FullName
)
$time_taken = Measure-Command {
clang-format $formatParams $targetFiles
}
Write-Host "Formatting complete in $($time_taken.TotalMilliseconds) ms`n"
}
Export-ModuleMember -Function format-cpp