@@ -15,6 +15,7 @@ mod kw {
1515 syn:: custom_keyword!( unchecked) ;
1616 syn:: custom_keyword!( no_std) ;
1717 syn:: custom_keyword!( raw_strings) ;
18+ syn:: custom_keyword!( macro_export) ;
1819 syn:: custom_keyword!( macro_call_prefix) ;
1920 syn:: custom_keyword!( export_macro_name) ;
2021 syn:: custom_keyword!( skip) ;
@@ -24,6 +25,7 @@ enum Opt {
2425 Unchecked ,
2526 NoStd ,
2627 RawStrings ,
28+ MacroExport ,
2729 MacroCallPrefix ( LitStr ) ,
2830 ExportMacroName ( LitStr ) ,
2931 Skip ( Vec < LitStr > ) ,
@@ -41,6 +43,9 @@ impl Parse for Opt {
4143 } else if l. peek ( kw:: raw_strings) {
4244 input. parse :: < kw:: raw_strings > ( ) ?;
4345 Ok ( Opt :: RawStrings )
46+ } else if l. peek ( kw:: macro_export) {
47+ input. parse :: < kw:: macro_export > ( ) ?;
48+ Ok ( Opt :: MacroExport )
4449 } else if l. peek ( kw:: macro_call_prefix) {
4550 input. parse :: < kw:: macro_call_prefix > ( ) ?;
4651 input. parse :: < Token ! [ : ] > ( ) ?;
@@ -68,6 +73,7 @@ impl wit_bindgen_rust_macro_shared::Configure<Opts> for Opt {
6873 Opt :: Unchecked => opts. unchecked = true ,
6974 Opt :: NoStd => opts. no_std = true ,
7075 Opt :: RawStrings => opts. raw_strings = true ,
76+ Opt :: MacroExport => opts. macro_export = true ,
7177 Opt :: MacroCallPrefix ( prefix) => opts. macro_call_prefix = Some ( prefix. value ( ) ) ,
7278 Opt :: ExportMacroName ( name) => opts. export_macro_name = Some ( name. value ( ) ) ,
7379 Opt :: Skip ( list) => opts. skip . extend ( list. iter ( ) . map ( |i| i. value ( ) ) ) ,
0 commit comments