1using Microsoft.CodeAnalysis;
6public readonly
struct TypeDeclWriter(INamedTypeSymbol symbol) :
ICodeWriter
8 public IEnumerable<WorkspaceDiagnostic> WriteTo(CodeWriter w, CodeContext ctx)
10 if (!symbol.IsTarget())
15 class [[mllif::export]] {{symbol.Name}} {
17 {{symbol.Name}}(void* handle) : _handle(handle) {}
19 {{symbol.Name}}({{symbol.Name}} const&) = delete;
20 {{symbol.Name}}& operator=({{symbol.Name}} const&) = delete;
26 w.WriteLine($
"~{symbol.Name}();");
30 foreach (var method
in symbol
32 .OfType<IMethodSymbol>()
33 .Where(SymbolExtension.IsTarget))
34 foreach (var diag
in new MethodDeclWriter(method).WriteTo(w, ctx))