pub struct CSharpBackend {
pub emit_public: bool,
pub emit_comments: bool,
pub prefer_async: bool,
/* private fields */
}Expand description
C# code generation backend for OxiLean.
Transforms LCNF declarations into idiomatic C# 12 source code.
Fields§
§emit_public: boolWhether to emit public visibility on generated declarations
emit_comments: boolWhether to emit XML doc comments
prefer_async: boolWhether to prefer async method generation
Implementations§
Source§impl CSharpBackend
impl CSharpBackend
Sourcepub fn mangle_name(name: &str) -> String
pub fn mangle_name(name: &str) -> String
Mangle an LCNF name into a valid C# identifier.
Sourcepub fn compile_decl(&self, decl: &LcnfFunDecl) -> CSharpMethod
pub fn compile_decl(&self, decl: &LcnfFunDecl) -> CSharpMethod
Compile a single LCNF function declaration into a C# method.
Sourcepub fn emit_module(
&self,
namespace: &str,
decls: &[LcnfFunDecl],
) -> CSharpModule
pub fn emit_module( &self, namespace: &str, decls: &[LcnfFunDecl], ) -> CSharpModule
Compile a complete list of LCNF declarations into a CSharpModule.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CSharpBackend
impl RefUnwindSafe for CSharpBackend
impl Send for CSharpBackend
impl Sync for CSharpBackend
impl Unpin for CSharpBackend
impl UnsafeUnpin for CSharpBackend
impl UnwindSafe for CSharpBackend
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more