1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//! Odra intermediate representation (IR) and abstractions.
//!
//! This module defines everything Odra procedural macro needs in order to parse,
//! analyze and generate code for smart contracts.
//!
//! This crate takes care of parsing and analyzing code. This process may fail
//! return [`syn::Error`].
//!
//! All the items are based on syn with special variants for Odra `impl` items.

mod attrs;
mod event_item;
mod execution_error;
mod external_contract_item;
mod instance_item;
mod mapping;
mod module_item;
mod odra_type_item;
mod utils;

pub use {
    event_item::EventItem, execution_error::error_enum::ErrorEnumItem,
    external_contract_item::ExternalContractItem, instance_item::InstanceItem, mapping::MapExpr,
    odra_type_item::OdraTypeItem
};

/// Odra module-related abstractions.
pub mod module {
    pub use crate::module_item::{
        constructor::Constructor,
        delegate::{DelegatedFunction, DelegationBlock, DelegationStatement},
        impl_item::ImplItem,
        method::Method,
        module_impl::ModuleImpl,
        module_struct::ModuleStruct,
        ModuleConfiguration, ModuleEvents, ModuleItem
    };
}