syn_solidity/
kw.rs

1//! Solidity keywords.
2
3macro_rules! custom_keywords {
4    ($($name:ident),+ $(,)?) => {$(
5        syn::custom_keyword!($name);
6
7        impl $crate::Spanned for $name {
8            #[inline]
9            fn span(&self) -> ::proc_macro2::Span {
10                self.span
11            }
12
13            #[inline]
14            fn set_span(&mut self, span: ::proc_macro2::Span) {
15                self.span = span;
16            }
17        }
18    )+};
19}
20
21#[rustfmt::skip]
22custom_keywords!(
23    // Storage
24    memory,
25    storage,
26    calldata,
27
28    // Visibility
29    external,
30    public,
31    internal,
32    private,
33
34    // Mutability
35    pure,
36    view,
37    constant,
38    payable,
39    immutable,
40
41    // Contract
42    contract,
43    interface,
44    library,
45
46    // Error
47    error,
48    panic,
49
50    // Event
51    event,
52    indexed,
53    anonymous,
54
55    // Function
56    constructor,
57    function,
58    fallback,
59    receive,
60    modifier,
61    returns,
62
63    // Types
64    tuple,
65    mapping,
66
67    // Import directives
68    import,
69    from,
70
71    // Pragma directives
72    pragma,
73    solidity,
74    abicoder,
75    experimental,
76
77    // Using directives
78    using,
79    global,
80
81    // Literals
82    unicode,
83    hex,
84
85    // Sub-denominations
86    wei,
87    gwei,
88    ether,
89    seconds,
90    minutes,
91    hours,
92    days,
93    weeks,
94    years,
95
96    // Other
97    assembly,
98    catch,
99    delete,
100    emit,
101    is,
102    new,
103    revert,
104    unchecked,
105
106    // Yul other
107    switch,
108    case,
109    default,
110    leave,
111
112    // Yul-EVM-builtin opcodes
113    stop,
114    add,
115    sub,
116    mul,
117    div,
118    sdiv,
119    //mod,
120    smod,
121    exp,
122    not,
123    lt,
124    gt,
125    slt,
126    sgt,
127    eq,
128    iszero,
129    and,
130    or,
131    xor,
132    byte,
133    shl,
134    shr,
135    sar,
136    addmod,
137    mulmod,
138    signextend,
139    keccak256,
140    pop,
141    mload,
142    mstore,
143    mstore8,
144    sload,
145    sstore,
146    msize,
147    gas,
148    address,
149    balance,
150    selfbalance,
151    caller,
152    callvalue,
153    calldataload,
154    calldatasize,
155    calldatacopy,
156    extcodesize,
157    extcodecopy,
158    returndatasize,
159    returndatacopy,
160    extcodehash,
161    create,
162    create2,
163    call,
164    callcode,
165    delegatecall,
166    staticcall,
167    //return,
168    //revert,
169    selfdestruct,
170    invalid,
171    log0,
172    log1,
173    log2,
174    log3,
175    log4,
176    chainid,
177    origin,
178    gasprice,
179    blockhash,
180    coinbase,
181    timestamp,
182    number,
183    difficulty,
184    prevrandao,
185    gaslimit,
186    basefee,
187);