generic code generation improvements

This commit is contained in:
timurgordon
2025-02-13 02:31:59 +03:00
parent f0c23eb4ae
commit 776942cd8b
6 changed files with 26 additions and 6 deletions

View File

@@ -1,6 +1,6 @@
@if function.description != ''
// @{function.description}
@endif
pub fn @receiver @{function.name}(@{params}) @{result} {
pub fn @receiver @{name}(@{params}) @{result} {
@{function.body.trim_space().replace('\t', '')}
}

View File

@@ -1,4 +1,4 @@
// @{struct_.description}
@{comments}
@if struct_.attrs.len > 0
[
@for attr in struct_.attrs
@@ -6,7 +6,7 @@
@end
]
@end
@{prefix} struct @{name} {
@{prefix}struct @{name} {
@for embed in struct_.embeds
@{embed.get_type_symbol()}
@end