pub struct ChapelBackend { /* private fields */ }Expand description
Backend state for emitting Chapel source code.
Implementations§
Source§impl ChapelBackend
impl ChapelBackend
Sourcepub fn with_config(config: ChapelConfig) -> Self
pub fn with_config(config: ChapelConfig) -> Self
Create a new backend with custom configuration.
Sourcepub fn emit_expr(&mut self, expr: &ChapelExpr)
pub fn emit_expr(&mut self, expr: &ChapelExpr)
Emit a Chapel expression.
Sourcepub fn emit_stmt(&mut self, stmt: &ChapelStmt)
pub fn emit_stmt(&mut self, stmt: &ChapelStmt)
Emit a single Chapel statement.
Sourcepub fn emit_proc(&mut self, proc: &ChapelProc)
pub fn emit_proc(&mut self, proc: &ChapelProc)
Emit a Chapel procedure definition.
Sourcepub fn emit_record(&mut self, rec: &ChapelRecord)
pub fn emit_record(&mut self, rec: &ChapelRecord)
Emit a Chapel record definition.
Sourcepub fn emit_class(&mut self, cls: &ChapelClass)
pub fn emit_class(&mut self, cls: &ChapelClass)
Emit a Chapel class definition.
Sourcepub fn emit_module(&mut self, module: &ChapelModule)
pub fn emit_module(&mut self, module: &ChapelModule)
Emit a complete Chapel module.
Sourcepub fn generate(module: &ChapelModule) -> String
pub fn generate(module: &ChapelModule) -> String
Generate a complete .chpl file from a module.
Sourcepub fn generate_with_config(
module: &ChapelModule,
config: ChapelConfig,
) -> String
pub fn generate_with_config( module: &ChapelModule, config: ChapelConfig, ) -> String
Generate with custom configuration.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ChapelBackend
impl RefUnwindSafe for ChapelBackend
impl Send for ChapelBackend
impl Sync for ChapelBackend
impl Unpin for ChapelBackend
impl UnsafeUnpin for ChapelBackend
impl UnwindSafe for ChapelBackend
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