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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
//! [ink!](https://use.ink/) intermediate representations (IRs) and abstractions
//! for [ink! analyzer](https://docs.rs/ink-analyzer/latest/ink_analyzer/).
//!
//! # Example
//! Generate an IR of ink! smart contract code.
//!
//! ```
//! use ink_analyzer_ir::{InkFile, quote_as_str};
//!
//! fn generate_ir() {
//! let file = InkFile::parse(quote_as_str! {
//! #[ink::contract]
//! mod flipper {
//!
//! #[ink(storage)]
//! pub struct Flipper {
//! value: bool,
//! }
//!
//! #[ink(event)]
//! pub struct Flip {
//! #[ink(topic)]
//! flipped: bool,
//! }
//!
//! // --snip--
//! }
//! });
//! dbg!(&file);
//!
//! let contracts = file.contracts();
//! dbg!(&contracts);
//!
//! if let Some(contract) = contracts.first() {
//! let events = contract.events();
//! dbg!(&events);
//! }
//! }
//! ```
pub use ;
// Re-export ra_ap_syntax as syntax.
pub use ra_ap_syntax as syntax;
/// Re-export ra_ap_syntax::ast as ast.
pub use ast;