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
#![allow(dead_code)]
#![allow(stable_features)]
#![recursion_limit="1024"]
extern crate proc_macro;
#[macro_use]
extern crate syn;
#[macro_use]
extern crate quote;
mod arg_def;
mod arg_extract;
mod arg_regular;
mod arg_str_deserialize;
mod arg_str_serialize;
mod contract;
mod contract_gen;
mod contract_gen_callback;
mod contract_gen_event;
mod contract_gen_finish;
mod contract_gen_payable;
mod contract_gen_method;
mod parse_attr;
mod snippets;
mod util;
mod reserved;
mod callable;
mod callable_gen;
fn wasm32_mode() -> bool {
let debug_mode = cfg!(debug_assertions);
!debug_mode
}
#[proc_macro_attribute]
pub fn contract(
args: proc_macro::TokenStream,
input: proc_macro::TokenStream,
) -> proc_macro::TokenStream {
contract::process_contract(args, input)
}
#[proc_macro_attribute]
pub fn callable(
args: proc_macro::TokenStream,
input: proc_macro::TokenStream,
) -> proc_macro::TokenStream {
callable::process_callable(args, input)
}