Crate ink_analyzer_macro
source ·Expand description
Procedural macros for ink! analyzer.
§Example
Using ink_analyzer_macro::entity
proc-macro to create a Contract
type.
use ink_analyzer_ir::{Event, Message, Storage};
use ink_analyzer_ir::ast;
#[ink_analyzer_macro::entity(macro_kind = Contract)]
#[derive(Debug, Clone, PartialEq, Eq)]
struct Contract {
ast: ast::Module,
storage: Option<Storage>,
events: Vec<Event>,
#[initializer(call = ink_analyzer_ir::ink_callable_closest_descendants)]
messages: Vec<Message>,
// --snip--
}
Attribute Macros§
- proc-macro that implements the
InkEntity
trait for anystruct
with anast
field, where the type forast
isT: ASTNode
.