diff --git a/sources/ClangSharpPInvokeGenerator/Program.cs b/sources/ClangSharpPInvokeGenerator/Program.cs index 11d21631..18d61955 100644 --- a/sources/ClangSharpPInvokeGenerator/Program.cs +++ b/sources/ClangSharpPInvokeGenerator/Program.cs @@ -54,7 +54,7 @@ public class Program private static Option s_withTypeNameValuePairs; private static Option s_withUsingNameValuePairs; - + private static readonly TwoColumnHelpRow[] s_configOptions = new TwoColumnHelpRow[] { new TwoColumnHelpRow("?, h, help", "Show help and usage information for -c, --config"), @@ -878,7 +878,9 @@ private static Option GetAdditionalOption() aliases: new string[] { "--additional", "-a" }, description: "An argument to pass to Clang when parsing the input files.", getDefaultValue: Array.Empty - ); + ) { + AllowMultipleArgumentsPerToken = true + }; } private static Option GetConfigOption() @@ -887,7 +889,9 @@ private static Option GetConfigOption() aliases: new string[] { "--config", "-c" }, description: "A configuration option that controls how the bindings are generated. Specify 'help' to see the available options.", getDefaultValue: Array.Empty - ); + ) { + AllowMultipleArgumentsPerToken = true + }; } private static Option GetDefineMacroOption() @@ -896,7 +900,9 @@ private static Option GetDefineMacroOption() aliases: new string[] { "--define-macro", "-D" }, description: "Define to (or 1 if omitted).", getDefaultValue: Array.Empty - ); + ) { + AllowMultipleArgumentsPerToken = true + }; } private static Option GetExcludeOption() @@ -905,7 +911,9 @@ private static Option GetExcludeOption() aliases: new string[] { "--exclude", "-e" }, description: "A declaration name to exclude from binding generation.", getDefaultValue: Array.Empty - ); + ) { + AllowMultipleArgumentsPerToken = true + }; } private static Option GetFileOption() @@ -914,7 +922,9 @@ private static Option GetFileOption() aliases: new string[] { "--file", "-f" }, description: "A file to parse and generate bindings for.", getDefaultValue: Array.Empty - ); + ) { + AllowMultipleArgumentsPerToken = true + }; } private static Option GetFileDirectoryOption() @@ -941,7 +951,9 @@ private static Option GetIncludeOption() aliases: new string[] { "--include", "-i" }, description: "A declaration name to include in binding generation.", getDefaultValue: Array.Empty - ); + ) { + AllowMultipleArgumentsPerToken = true + }; } private static Option GetIncludeDirectoryOption() @@ -950,7 +962,9 @@ private static Option GetIncludeDirectoryOption() aliases: new string[] { "--include-directory", "-I" }, description: "Add directory to include search path.", getDefaultValue: Array.Empty - ); + ) { + AllowMultipleArgumentsPerToken = true + }; } private static Option GetLanguageOption() @@ -1022,7 +1036,9 @@ private static Option GetRemapOption() aliases: new string[] { "--remap", "-r" }, description: "A declaration name to be remapped to another name during binding generation.", getDefaultValue: Array.Empty - ); + ) { + AllowMultipleArgumentsPerToken = true + }; } private static Option GetStdOption() @@ -1059,7 +1075,9 @@ private static Option GetTraverseOption() aliases: new string[] { "--traverse", "-t" }, description: "A file name included either directly or indirectly by -f that should be traversed during binding generation.", getDefaultValue: Array.Empty - ); + ) { + AllowMultipleArgumentsPerToken = true + }; } private static Option GetWithAccessSpecifierOption() @@ -1068,7 +1086,9 @@ private static Option GetWithAccessSpecifierOption() aliases: new string[] { "--with-access-specifier", "-was" }, description: "An access specifier to be used with the given qualified or remapped declaration name during binding generation.", getDefaultValue: Array.Empty - ); + ) { + AllowMultipleArgumentsPerToken = true + }; } private static Option GetWithAttributeOption() @@ -1077,7 +1097,9 @@ private static Option GetWithAttributeOption() aliases: new string[] { "--with-attribute", "-wa" }, description: "An attribute to be added to the given remapped declaration name during binding generation.", getDefaultValue: Array.Empty - ); + ) { + AllowMultipleArgumentsPerToken = true + }; } private static Option GetWithCallConvOption() @@ -1085,7 +1107,10 @@ private static Option GetWithCallConvOption() return new Option( aliases: new string[] { "--with-callconv", "-wcc" }, description: "A calling convention to be used for the given declaration during binding generation.", - getDefaultValue: Array.Empty); + getDefaultValue: Array.Empty + ) { + AllowMultipleArgumentsPerToken = true + }; } private static Option GetWithClassOption() @@ -1093,7 +1118,10 @@ private static Option GetWithClassOption() return new Option( aliases: new string[] { "--with-class", "-wc" }, description: "A class to be used for the given remapped constant or function declaration name during binding generation.", - getDefaultValue: Array.Empty); + getDefaultValue: Array.Empty + ) { + AllowMultipleArgumentsPerToken = true + }; } private static Option GetWithLibraryPathOption() @@ -1101,7 +1129,10 @@ private static Option GetWithLibraryPathOption() return new Option( aliases: new string[] { "--with-librarypath", "-wlb" }, description: "A library path to be used for the given declaration during binding generation.", - getDefaultValue: Array.Empty); + getDefaultValue: Array.Empty + ) { + AllowMultipleArgumentsPerToken = true + }; } private static Option GetWithManualImportOption() @@ -1109,7 +1140,10 @@ private static Option GetWithManualImportOption() return new Option( aliases: new string[] { "--with-manual-import", "-wmi" }, description: "A remapped function name to be treated as a manual import during binding generation.", - getDefaultValue: Array.Empty); + getDefaultValue: Array.Empty + ) { + AllowMultipleArgumentsPerToken = true + }; } private static Option GetWithNamespaceOption() @@ -1117,7 +1151,10 @@ private static Option GetWithNamespaceOption() return new Option( aliases: new string[] { "--with-namespace", "-wn" }, description: "A namespace to be used for the given remapped declaration name during binding generation.", - getDefaultValue: Array.Empty); + getDefaultValue: Array.Empty + ) { + AllowMultipleArgumentsPerToken = true + }; } private static Option GetWithSetLastErrorOption() @@ -1125,7 +1162,10 @@ private static Option GetWithSetLastErrorOption() return new Option( aliases: new string[] { "--with-setlasterror", "-wsle" }, description: "Add the SetLastError=true modifier or SetsSystemLastError attribute to a given DllImport or UnmanagedFunctionPointer.", - getDefaultValue: Array.Empty); + getDefaultValue: Array.Empty + ) { + AllowMultipleArgumentsPerToken = true + }; } private static Option GetWithSuppressGCTransitionOption() @@ -1133,7 +1173,10 @@ private static Option GetWithSuppressGCTransitionOption() return new Option( aliases: new string[] { "--with-suppressgctransition", "-wsgct" }, description: "Add the SuppressGCTransition calling convention to a given DllImport or UnmanagedFunctionPointer.", - getDefaultValue: Array.Empty); + getDefaultValue: Array.Empty + ) { + AllowMultipleArgumentsPerToken = true + }; } private static Option GetWithTransparentStructOption() @@ -1141,7 +1184,10 @@ private static Option GetWithTransparentStructOption() return new Option( aliases: new string[] { "--with-transparent-struct", "-wts" }, description: "A remapped type name to be treated as a transparent wrapper during binding generation.", - getDefaultValue: Array.Empty); + getDefaultValue: Array.Empty + ) { + AllowMultipleArgumentsPerToken = true + }; } private static Option GetWithTypeOption() @@ -1149,7 +1195,10 @@ private static Option GetWithTypeOption() return new Option( aliases: new string[] { "--with-type", "-wt" }, description: "A type to be used for the given enum declaration during binding generation.", - getDefaultValue: Array.Empty); + getDefaultValue: Array.Empty + ) { + AllowMultipleArgumentsPerToken = true + }; } private static Option GetWithUsingOption() @@ -1157,7 +1206,10 @@ private static Option GetWithUsingOption() return new Option( aliases: new string[] { "--with-using", "-wu" }, description: "A using directive to be included for the given remapped declaration name during binding generation.", - getDefaultValue: Array.Empty); + getDefaultValue: Array.Empty + ) { + AllowMultipleArgumentsPerToken = true + }; } } }