Throw correct error when an unimplemented command is used with arguments

Fixes #7207
This commit is contained in:
Jason Fields 2021-10-29 19:57:55 -04:00
parent 9712a7744a
commit b58bb6ed25

View File

@ -632,7 +632,7 @@ function nameParser(
name: [string, string],
argParser: ArgParser | undefined
): Parser<Parser<ExCommand>> {
argParser ??= succeed(new UnimplementedCommand(name[1] ? `${name[0]}[${name[1]}]` : name[0]));
argParser ??= all.result(new UnimplementedCommand(name[1] ? `${name[0]}[${name[1]}]` : name[0]));
const fullName = name[0] + name[1];
const p = nameAbbrevParser(name[0], name[1]).result(argParser);