Heavy refactor..

Isolating large macros to their own directory (components/temp).
- Plan is to remove them soon with proper generation.

Added additional component files, separating the old data_structures header for a set of ast headers.
Header_end also had its inlines extracted out.
Necessary to complete the macro isolation.

ZPL parser dependencies were removed from the core library along with builder, its now generated in bootstrap as pare of making a gen_builder set of files.

Singleheader will be changed in next few commits to reflect this as well (By making builder deps and components a conditional option).

Tests are most likely all broken for now.
This commit is contained in:
2023-08-03 11:01:43 -04:00
parent 114f678f1b
commit 5d7dfaf666
63 changed files with 3341 additions and 1382 deletions

View File

@ -22,7 +22,7 @@ write-host "`n`nBuilding gencpp bootstrap`n"
if ( -not( Test-Path $path_project_build) )
{
# Generate build files for meta-program
# Generate build files for bootstrap
Push-Location $path_project
$args_meson = @()
$args_meson += "setup"
@ -32,7 +32,7 @@ Push-Location $path_project
Pop-Location
}
# Compile meta-program
# Compile bootstrap
Push-Location $path_root
$args_ninja = @()
$args_ninja += "-C"
@ -42,29 +42,36 @@ Push-Location $path_root
Pop-Location
Push-location $path_project
if ( -not(Test-Path($path_project_gen) )) {
New-Item -ItemType Directory -Path $path_project_gen
}
if ( -not(Test-Path($path_project_gen) )) {
New-Item -ItemType Directory -Path $path_project_gen
}
# Run meta-program
$gencpp_bootstrap = Join-Path $path_project_build gencpp_bootstrap.exe
# Run bootstrap
$gencpp_bootstrap = Join-Path $path_project_build gencpp_bootstrap.exe
Write-Host `nRunning gencpp bootstrap...
& $gencpp_bootstrap
Write-Host `nRunning gencpp bootstrap...
& $gencpp_bootstrap
# Format generated files
Write-Host `nBeginning format...
$formatParams = @(
'-i' # In-place
'-style=file:../scripts/.clang-format'
'-verbose'
)
# Format generated gencpp
Write-Host `nBeginning format...
$formatParams = @(
'-i' # In-place
'-style=file:../scripts/.clang-format'
'-verbose'
)
$include = @('gen.hpp', 'gen.cpp', 'gen_dep.hpp', 'gen_dep.cpp')
$exclude = $null
$include = @(
'gen.hpp', 'gen.cpp',
'gen_dep.hpp', 'gen_dep.cpp',
'gen_builder.hpp', 'gen_builder.cpp'
)
$exclude = $null
$targetFiles = @(Get-ChildItem -Recurse -Path $path_project_gen -Include $include -Exclude $exclude | Select-Object -ExpandProperty FullName)
$targetFiles = @(Get-ChildItem -Recurse -Path $path_project_gen -Include $include -Exclude $exclude | Select-Object -ExpandProperty FullName)
clang-format $formatParams $targetFiles
Write-Host "`nFormatting complete"
clang-format $formatParams $targetFiles
Write-Host "`nFormatting complete"
Pop-Location
# Build and run validation