Skip to main content

Crate pliron_derive

Crate pliron_derive 

Source

Attribute Macros§

attr_interface
Declare an Attribute interface, which can be implemented by any Attribute.
attr_interface_impl
Implement Attribute Interface for an Attribute. The interface trait must define a verify function with type AttrInterfaceVerifier.
def_attribute
#[def_attribute(...)]: Annotate a Rust struct as a new IR attribute.
def_op
#[def_op(...)]: Create a new IR operation.
def_type
#[def_type(...)]: Annotate a Rust struct as a new IR type.
derive_attr_get_set
Derive getter and setters for operation attributes listed as arguments. The arguments are a comma separated list of attribute names (which must be an Identifier), each of which may have an optional concrete Rust type specified, denoting the Attribute’s concrete type.
derive_op_interface_impl
Derive implementation of an Op Interface for an Op. Note that an impl can be derived only for those interfaces that do not require any methods to be defined during the impl.
derive_type_get
Derive get methods for types that retrieve interned types.
format
Derive Printable and Parsable for Rust types. Use this is for types other than Op, Type and Attributes.
format_attribute
Derive Printable and Parsable for Attributes
format_op
Derive Printable and Parsable for Ops This derive only supports a syntax in which results appear before the opid: res1, ... = opid ... The format string specifies what comes after the opid.
format_type
Derive Printable and Parsable for Types
op_interface
Declare an Op interface, which can be implemented by any Op.
op_interface_impl
Implement Op Interface for an Op. The interface trait must define a verify function with type OpInterfaceVerifier
type_interface
Declare a Type interface, which can be implemented by any Type.
type_interface_impl
Implement Type Interface for a Type. The interface trait must define a verify function with type TypeInterfaceVerifier.