| 80 | } |
| 81 | |
| 82 | fn process_rust_item(item: syn::Item, state: &mut BuildState, config: &BuildSettings) { |
| 83 | match item { |
| 84 | syn::Item::Const(exported_const) => { |
| 85 | check_tsync!(exported_const, in: "const", { |
| 86 | exported_const.convert_to_ts(state, config); |
| 87 | }); |
| 88 | } |
| 89 | syn::Item::Struct(exported_struct) => { |
| 90 | check_tsync!(exported_struct, in: "struct", { |
| 91 | exported_struct.convert_to_ts(state, config); |
| 92 | }); |
| 93 | } |
| 94 | syn::Item::Enum(exported_enum) => { |
| 95 | check_tsync!(exported_enum, in: "enum", { |
| 96 | exported_enum.convert_to_ts(state, config); |
| 97 | }); |
| 98 | } |
| 99 | syn::Item::Type(exported_type) => { |
| 100 | check_tsync!(exported_type, in: "type", { |
| 101 | exported_type.convert_to_ts(state, config); |
| 102 | }); |
| 103 | } |
| 104 | _ => {} |
| 105 | } |
| 106 | } |
| 107 | |
| 108 | fn process_rust_file<P: AsRef<Path>>( |
| 109 | input_path: P, |