From c11ad1c06902ca431861f1a956a5aaab7881d83e Mon Sep 17 00:00:00 2001 From: tjvr Date: Wed, 5 Apr 2017 15:34:16 +0100 Subject: [PATCH] Remove remaining() This reverts commit 81a0ac807f66290f76705a33cf2a2aa4b7ddf54f. --- moo.js | 4 ---- test/test.js | 10 ---------- 2 files changed, 14 deletions(-) diff --git a/moo.js b/moo.js index c927495..5861cc3 100644 --- a/moo.js +++ b/moo.js @@ -424,10 +424,6 @@ } } - Lexer.prototype.remaining = function() { - return this.buffer.slice(this.index) - } - Lexer.prototype.clone = function() { return new Lexer(this.states, this.state) } diff --git a/test/test.js b/test/test.js index eb77b74..3e373f4 100644 --- a/test/test.js +++ b/test/test.js @@ -251,16 +251,6 @@ describe('lexer', () => { expect(clone.next()).toMatchObject({value: '2'}) }) - test('remaining', () => { - simpleLexer.reset('lik bred') - simpleLexer.next() - expect(simpleLexer.remaining()).toBe(' bred') - simpleLexer.next() - expect(simpleLexer.remaining()).toBe('bred') - simpleLexer.next() - expect(simpleLexer.remaining()).toBe('') - }) - })