mirror of
https://github.com/VSCodeVim/Vim.git
synced 2024-09-11 12:25:59 +03:00
Remove namespace
I don't think namespaces are technically deprecated, but they're an unnecessary typescript-only feature that we're using in exactly one place, so let's stop.
This commit is contained in:
parent
bb56b499fa
commit
9487360e59
@ -8,7 +8,7 @@ export function lex(input: string): Token[] {
|
||||
// We use a character scanner as state for the lexer.
|
||||
const state = new Scanner(input);
|
||||
const tokens: Token[] = [];
|
||||
let f: ILexFunction | null = LexerFunctions.lexRange;
|
||||
let f: ILexFunction | null = lexRange;
|
||||
while (f) {
|
||||
// Each lexing function returns the next lexing function or null.
|
||||
f = f(state, tokens);
|
||||
@ -22,9 +22,8 @@ function emitToken(type: TokenType, state: Scanner): Token | null {
|
||||
return content.length > 0 ? new Token(type, content) : null;
|
||||
}
|
||||
|
||||
namespace LexerFunctions {
|
||||
// Starts lexing a Vim command line and delegates on other lexer functions as needed.
|
||||
export function lexRange(state: Scanner, tokens: Token[]): ILexFunction | null {
|
||||
function lexRange(state: Scanner, tokens: Token[]): ILexFunction | null {
|
||||
while (true) {
|
||||
if (state.isAtEof) {
|
||||
break;
|
||||
@ -231,4 +230,3 @@ namespace LexerFunctions {
|
||||
}
|
||||
return lexRange;
|
||||
}
|
||||
}
|
||||
|
@ -6,7 +6,6 @@
|
||||
"max-classes-per-file": false,
|
||||
"no-console": [true, "debug", "info", "time", "timeEnd", "trace"],
|
||||
"no-duplicate-variable": true,
|
||||
"no-namespace": false,
|
||||
"no-parameter-properties": true,
|
||||
"no-return-await": true,
|
||||
"no-switch-case-fall-through": true,
|
||||
|
Loading…
Reference in New Issue
Block a user