mirror of
https://github.com/Ed94/gencpp.git
synced 2025-06-14 18:51:47 -07:00
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:
@ -6,16 +6,22 @@ AlignAfterOpenBracket: BlockIndent
|
||||
AlignArrayOfStructures: Left
|
||||
AlignConsecutiveAssignments:
|
||||
Enabled: true
|
||||
AcrossEmptyLines: false
|
||||
AcrossComments: true
|
||||
AcrossEmptyLines: true
|
||||
AcrossComments: false
|
||||
AlignCompound: true
|
||||
PadOperators: true
|
||||
AlignConsecutiveBitFields: AcrossComments
|
||||
AlignConsecutiveDeclarations: AcrossComments
|
||||
AlignConsecutiveBitFields:
|
||||
Enabled: true
|
||||
AcrossEmptyLines: true
|
||||
AcrossComments: false
|
||||
AlignConsecutiveDeclarations:
|
||||
Enabled: true
|
||||
AcrossEmptyLines: false
|
||||
AcrossComments: false
|
||||
AlignConsecutiveMacros:
|
||||
Enabled: true
|
||||
AcrossEmptyLines: true
|
||||
AcrossComments: true
|
||||
AcrossComments: false
|
||||
AlignEscapedNewlines: Left
|
||||
AlignOperands: DontAlign
|
||||
|
||||
@ -62,7 +68,7 @@ BraceWrapping:
|
||||
BeforeWhile: false
|
||||
|
||||
BreakAfterAttributes: Always
|
||||
# BreakArrays: false
|
||||
BreakArrays: true
|
||||
# BreakBeforeInlineASMColon: OnlyMultiline
|
||||
BreakBeforeBinaryOperators: NonAssignment
|
||||
BreakBeforeBraces: Allman
|
||||
@ -73,7 +79,7 @@ BreakBeforeTernaryOperators: true
|
||||
BreakConstructorInitializers: BeforeComma
|
||||
BreakStringLiterals: true
|
||||
|
||||
ColumnLimit: 120
|
||||
ColumnLimit: 160
|
||||
|
||||
CompactNamespaces: true
|
||||
|
||||
@ -92,7 +98,6 @@ FixNamespaceComments: true
|
||||
|
||||
IncludeBlocks: Preserve
|
||||
|
||||
|
||||
IndentCaseBlocks: false
|
||||
IndentCaseLabels: true
|
||||
IndentExternBlock: AfterExternBlock
|
||||
@ -128,7 +133,7 @@ SeparateDefinitionBlocks: Always
|
||||
ShortNamespaceLines: 40
|
||||
|
||||
SortIncludes: false
|
||||
SortUsingDeclarations: true
|
||||
SortUsingDeclarations: false
|
||||
|
||||
SpaceAfterCStyleCast: false
|
||||
SpaceAfterLogicalNot: true
|
||||
|
@ -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
|
||||
|
||||
|
@ -42,29 +42,32 @@ Push-Location $path_root
|
||||
Pop-Location
|
||||
|
||||
Push-location $path_singleheader
|
||||
if ( -not(Test-Path($path_singleheader_gen) )) {
|
||||
New-Item -ItemType Directory -Path $path_singleheader_gen
|
||||
}
|
||||
if ( -not(Test-Path($path_singleheader_gen) )) {
|
||||
New-Item -ItemType Directory -Path $path_singleheader_gen
|
||||
}
|
||||
|
||||
# Run meta-program
|
||||
$gencpp_singleheader = Join-Path $path_singleheader_build gencpp_singleheader.exe
|
||||
# Run meta-program
|
||||
$gencpp_singleheader = Join-Path $path_singleheader_build gencpp_singleheader.exe
|
||||
|
||||
Write-Host `nRunning gencpp singleheader...
|
||||
& $gencpp_singleheader
|
||||
Write-Host `nRunning gencpp singleheader...
|
||||
& $gencpp_singleheader
|
||||
|
||||
# Format generated files
|
||||
Write-Host `nBeginning format...
|
||||
$formatParams = @(
|
||||
'-i' # In-place
|
||||
'-style=file:../scripts/.clang-format'
|
||||
'-verbose'
|
||||
)
|
||||
# Format generated files
|
||||
Write-Host `nBeginning format...
|
||||
$formatParams = @(
|
||||
'-i' # In-place
|
||||
'-style=file:../scripts/.clang-format'
|
||||
'-verbose'
|
||||
)
|
||||
|
||||
$include = @('gen.hpp')
|
||||
$exclude = $null
|
||||
$include = @('gen.hpp')
|
||||
$exclude = $null
|
||||
|
||||
$targetFiles = @(Get-ChildItem -Recurse -Path $path_project -Include $include -Exclude $exclude | Select-Object -ExpandProperty FullName)
|
||||
$targetFiles = @(Get-ChildItem -Recurse -Path $path_project -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
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
cls
|
||||
|
||||
[string] $type = $null
|
||||
[string] $test = $false
|
||||
|
||||
|
Reference in New Issue
Block a user