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