mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2026-12-01 06:57:59 -06:00
include description
This commit is contained in:
@@ -31,12 +31,14 @@ class BaseParser {
|
||||
return compiler.exec(compiler.compiler.exe, [helpArg]).then(result => {
|
||||
const options = {};
|
||||
if (result.code === 0) {
|
||||
const optionFinder = /^\s*(--?[-a-zA-Z]+)/;
|
||||
const optionFinder = /^\s*(--?[-a-zA-Z]+)\s*(.*)/;
|
||||
|
||||
utils.eachLine(result.stdout + result.stderr, line => {
|
||||
const match = line.match(optionFinder);
|
||||
if (!match) return;
|
||||
options[match[1]] = true;
|
||||
options[match[1]] = {
|
||||
"description": match[2]
|
||||
};
|
||||
});
|
||||
}
|
||||
compiler.compiler.possibleArguments = options;
|
||||
|
||||
Reference in New Issue
Block a user