Skip to content

Commit ee7d84b

Browse files
committed
make linter happy
1 parent 9c8de63 commit ee7d84b

6 files changed

Lines changed: 26 additions & 49 deletions

File tree

src/common/parser/ApcParser.test.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -71,16 +71,16 @@ describe('ApcParser', () => {
7171
]);
7272
});
7373

74-
//it('identifier with no payload', () => {
75-
// parser.start('G'.charCodeAt(0));
76-
// const data = toUtf32('');
77-
// parser.put(data, 0, data.length);
78-
// parser.end(true);
79-
// assert.deepEqual(reports, [
80-
// [0x47, 'START', undefined],
81-
// [0x47, 'END', true]
82-
// ]);
83-
//});
74+
// it('identifier with no payload', () => {
75+
// parser.start('G'.charCodeAt(0));
76+
// const data = toUtf32('');
77+
// parser.put(data, 0, data.length);
78+
// parser.end(true);
79+
// assert.deepEqual(reports, [
80+
// [0x47, 'START', undefined],
81+
// [0x47, 'END', true]
82+
// ]);
83+
// });
8484

8585
it('identifier with chunked payload', () => {
8686
parser.start('G'.charCodeAt(0));
@@ -100,11 +100,11 @@ describe('ApcParser', () => {
100100
]);
101101
});
102102

103-
//it('empty APC sequence', () => {
104-
// parser.start('G'.charCodeAt(0));
105-
// parser.end(true);
106-
// assert.deepEqual(reports, []);
107-
//});
103+
// it('empty APC sequence', () => {
104+
// parser.start('G'.charCodeAt(0));
105+
// parser.end(true);
106+
// assert.deepEqual(reports, []);
107+
// });
108108
});
109109

110110
describe('handler registration', () => {

src/common/parser/ApcParser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55

66
import { IApcHandler, IHandlerCollection, ApcFallbackHandlerType, IApcParser, ISubParserStackState } from 'common/parser/Types';
7-
import { ApcState, ParserConstants } from 'common/parser/Constants';
7+
import { ParserConstants } from 'common/parser/Constants';
88
import { utf32ToString } from 'common/input/TextDecoder';
99
import { IDisposable } from 'common/Types';
1010

src/common/parser/Constants.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -62,16 +62,6 @@ export const enum OscState {
6262
ABORT = 3
6363
}
6464

65-
/**
66-
* Internal states of ApcParser.
67-
*/
68-
export const enum ApcState {
69-
START = 0,
70-
ID = 1,
71-
PAYLOAD = 2,
72-
ABORT = 3
73-
}
74-
7565
// payload limit for OSC and DCS
7666
export const enum ParserConstants {
7767
PAYLOAD_LIMIT = 10000000

src/common/parser/EscapeSequenceParser.test.ts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -727,20 +727,6 @@ describe('EscapeSequenceParser', () => {
727727
}
728728
}
729729
});
730-
//it('trans ANYWHERE/ESCAPE --> APC_STRING', () => {
731-
// parser.reset();
732-
// // C0 (ESC _)
733-
// parse(parser, '\x1b_');
734-
// assert.equal(parser.currentState, ParserState.APC_STRING);
735-
// parser.reset();
736-
// // C1
737-
// for (state in states) {
738-
// parser.currentState = state;
739-
// parse(parser, '\x9f');
740-
// assert.equal(parser.currentState, ParserState.APC_STRING);
741-
// parser.reset();
742-
// }
743-
//});
744730
it('state SOS_PM_STRING ignore rules', () => {
745731
parser.reset();
746732
let ignored = r(0x00, 0x18);

src/common/parser/EscapeSequenceParser.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ const NON_ASCII_PRINTABLE = 0xA0;
7777
* Taken from https://vt100.net/emu/dec_ansi_parser.
7878
*/
7979
export const VT500_TRANSITION_TABLE = (function (): TransitionTable {
80-
// table size: (ParserState.STATE_LENGTH - 1) << TableAccess.INDEX_STATE_SHIFT | NON_ASCII_PRINTABLE + 1
80+
// table size:
81+
// (ParserState.STATE_LENGTH - 1) << TableAccess.INDEX_STATE_SHIFT | NON_ASCII_PRINTABLE + 1
8182
const table: TransitionTable = new TransitionTable(4257);
8283

8384
// range macro for byte
@@ -891,13 +892,13 @@ export class EscapeSequenceParser extends Disposable implements IEscapeSequenceP
891892
case ParserAction.APC_PUT:
892893
// FIXME: this is wrong, must be 00/08 .. 00/13, 02/00 .. 07/14 + NON_ASCII_PRINTABLE
893894
// inner loop - exit APC_PUT: 0x18, 0x1a, 0x1b, 0x9c
894-
//for (let j = i + 1; ; ++j) {
895-
// if (j >= length || (code = data[j]) === 0x18 || code === 0x1a || code === 0x1b || code === 0x9c || (code > 0x7f && code < NON_ASCII_PRINTABLE)) {
896-
// this._apcParser.put(data, i, j);
897-
// i = j - 1;
898-
// break;
899-
// }
900-
//}
895+
// for (let j = i + 1; ; ++j) {
896+
// if (j >= length || (code = data[j]) === 0x18 || code === 0x1a || code === 0x1b || code === 0x9c || (code > 0x7f && code < NON_ASCII_PRINTABLE)) {
897+
// this._apcParser.put(data, i, j);
898+
// i = j - 1;
899+
// break;
900+
// }
901+
// }
901902
this._apcParser.put(data, i, i+1);
902903
break;
903904
case ParserAction.APC_END:

test/playwright/Parser.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ test.describe('Parser Integration Tests', () => {
334334
window.customApcHandlerCallStack!.push(['F', data]);
335335
return true;
336336
}),
337-
term.parser.registerApcHandler({ final: 'X' }, data => {
337+
term.parser.registerApcHandler({ final: 'X' }, data => {
338338
window.customApcHandlerCallStack!.push(['X', data]);
339339
return true;
340340
})

0 commit comments

Comments
 (0)