Skip to content

Commit 5db6310

Browse files
committed
test_runner: remove scanAll()
1 parent 75d347b commit 5db6310

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

lib/internal/test_runner/tap_lexer.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -170,12 +170,6 @@ class TapLexer {
170170
yield this.scanEOF();
171171
}
172172

173-
*scanAll() {
174-
for (const token of this.scan()) {
175-
yield token;
176-
}
177-
}
178-
179173
next() {
180174
return this.source.next();
181175
}
@@ -241,7 +235,10 @@ class TapLexer {
241235
// if the escape symbol has been escaped (by previous symbol),
242236
// or if the next symbol is a whitespace symbol,
243237
// then consume it as a literal.
244-
if (this.hasTheCurrentCharacterBeenEscaped() || this.source.peek(1) === TokenKind.WHITESPACE) {
238+
if (
239+
this.hasTheCurrentCharacterBeenEscaped() ||
240+
this.source.peek(1) === TokenKind.WHITESPACE
241+
) {
245242
this.escapeStack.pop();
246243
return new Token({
247244
kind: TokenKind.LITERAL,

lib/internal/test_runner/tap_parser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const { TapLexer, TokenKind } = require('internal/test_runner/tap_lexer');
3535
class TapParser {
3636
constructor(input, options = {}) {
3737
this.lexer = new TapLexer(input);
38-
this.tokens = this.chunk(this.lexer.scanAll());
38+
this.tokens = this.chunk(this.lexer.scan());
3939
this.currentTokenIndex = 0;
4040
this.currentTokenChunk = 0;
4141
this.currentToken = null;

0 commit comments

Comments
 (0)