Skip to content

Commit 3b82b2d

Browse files
committed
Trivial refactor
1 parent a41fe2f commit 3b82b2d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/cmd_line/commands/let.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import {
3131
} from '../../vimscript/expression/types';
3232
import { displayValue } from '../../vimscript/expression/displayValue';
3333
import { ErrorCode, VimError } from '../../error';
34+
import { bangParser } from '../../vimscript/parserUtils';
3435

3536
type Unpack = {
3637
type: 'unpack';
@@ -286,13 +287,13 @@ export class LetCommand extends ExCommand {
286287

287288
export class UnletCommand extends ExCommand {
288289
public static readonly argParser = seqMap(
289-
string('!').fallback(undefined),
290+
bangParser,
290291
whitespace.then(variableParser.sepBy(whitespace)),
291292
(bang, variables) => {
292293
if (variables.length === 0) {
293294
throw VimError.fromCode(ErrorCode.ArgumentRequired);
294295
}
295-
return new UnletCommand(variables, bang !== undefined);
296+
return new UnletCommand(variables, bang);
296297
},
297298
);
298299

0 commit comments

Comments
 (0)