in lib/src/executables/ffigen.dart [124:171]
ArgResults getArgResults(List<String> args) {
final parser = ArgParser(allowTrailingOptions: true);
parser.addSeparator(
'FFIGEN: Generate dart bindings from C header files\nUsage:');
parser.addOption(
conf,
help: 'Path to Yaml file containing configurations if not in pubspec.yaml',
);
parser.addOption(
verbose,
abbr: 'v',
defaultsTo: logInfo,
allowed: [
logAll,
logFine,
logInfo,
logWarning,
logSevere,
],
);
parser.addFlag(
help,
abbr: 'h',
help: 'Prints this usage',
negatable: false,
);
parser.addOption(
compilerOpts,
help: 'Compiler options for clang. (E.g --$compilerOpts "-I/headers -W")',
);
ArgResults results;
try {
results = parser.parse(args);
if (results.wasParsed(help)) {
print(parser.usage);
exit(0);
}
} catch (e) {
print(e);
print(parser.usage);
exit(1);
}
return results;
}