kecc::ir

Trait WriteOp

Source
pub trait WriteOp {
    // Required method
    fn write_operation(&self) -> String;
}
Expand description

Format lang_c::ast::{Binary,Unary}Operations into KECC-IR.

Most cases, fmt::Display is used to format a type to a string. However, in some cases, we can’t implement fmt::Display for a type as it is defined in another crate. In such cases, we can implement this trait to format the type to a string.

Required Methods§

Source

fn write_operation(&self) -> String

Change operations into a String.

Implementations on Foreign Types§

Source§

impl WriteOp for BinaryOperator

Source§

impl WriteOp for UnaryOperator

Implementors§