make linter happy

This commit is contained in:
Jörg Breitbart
2026-04-24 14:19:55 +02:00
parent 9c8de633e9
commit ee7d84bdd3
6 changed files with 26 additions and 49 deletions
+15 -15
View File
@@ -71,16 +71,16 @@ describe('ApcParser', () => {
]);
});
//it('identifier with no payload', () => {
// parser.start('G'.charCodeAt(0));
// const data = toUtf32('');
// parser.put(data, 0, data.length);
// parser.end(true);
// assert.deepEqual(reports, [
// [0x47, 'START', undefined],
// [0x47, 'END', true]
// ]);
//});
// it('identifier with no payload', () => {
// parser.start('G'.charCodeAt(0));
// const data = toUtf32('');
// parser.put(data, 0, data.length);
// parser.end(true);
// assert.deepEqual(reports, [
// [0x47, 'START', undefined],
// [0x47, 'END', true]
// ]);
// });
it('identifier with chunked payload', () => {
parser.start('G'.charCodeAt(0));
@@ -100,11 +100,11 @@ describe('ApcParser', () => {
]);
});
//it('empty APC sequence', () => {
// parser.start('G'.charCodeAt(0));
// parser.end(true);
// assert.deepEqual(reports, []);
//});
// it('empty APC sequence', () => {
// parser.start('G'.charCodeAt(0));
// parser.end(true);
// assert.deepEqual(reports, []);
// });
});
describe('handler registration', () => {
+1 -1
View File
@@ -4,7 +4,7 @@
*/
import { IApcHandler, IHandlerCollection, ApcFallbackHandlerType, IApcParser, ISubParserStackState } from 'common/parser/Types';
import { ApcState, ParserConstants } from 'common/parser/Constants';
import { ParserConstants } from 'common/parser/Constants';
import { utf32ToString } from 'common/input/TextDecoder';
import { IDisposable } from 'common/Types';
-10
View File
@@ -62,16 +62,6 @@ export const enum OscState {
ABORT = 3
}
/**
* Internal states of ApcParser.
*/
export const enum ApcState {
START = 0,
ID = 1,
PAYLOAD = 2,
ABORT = 3
}
// payload limit for OSC and DCS
export const enum ParserConstants {
PAYLOAD_LIMIT = 10000000
@@ -727,20 +727,6 @@ describe('EscapeSequenceParser', () => {
}
}
});
//it('trans ANYWHERE/ESCAPE --> APC_STRING', () => {
// parser.reset();
// // C0 (ESC _)
// parse(parser, '\x1b_');
// assert.equal(parser.currentState, ParserState.APC_STRING);
// parser.reset();
// // C1
// for (state in states) {
// parser.currentState = state;
// parse(parser, '\x9f');
// assert.equal(parser.currentState, ParserState.APC_STRING);
// parser.reset();
// }
//});
it('state SOS_PM_STRING ignore rules', () => {
parser.reset();
let ignored = r(0x00, 0x18);
+9 -8
View File
@@ -77,7 +77,8 @@ const NON_ASCII_PRINTABLE = 0xA0;
* Taken from https://vt100.net/emu/dec_ansi_parser.
*/
export const VT500_TRANSITION_TABLE = (function (): TransitionTable {
// table size: (ParserState.STATE_LENGTH - 1) << TableAccess.INDEX_STATE_SHIFT | NON_ASCII_PRINTABLE + 1
// table size:
// (ParserState.STATE_LENGTH - 1) << TableAccess.INDEX_STATE_SHIFT | NON_ASCII_PRINTABLE + 1
const table: TransitionTable = new TransitionTable(4257);
// range macro for byte
@@ -891,13 +892,13 @@ export class EscapeSequenceParser extends Disposable implements IEscapeSequenceP
case ParserAction.APC_PUT:
// FIXME: this is wrong, must be 00/08 .. 00/13, 02/00 .. 07/14 + NON_ASCII_PRINTABLE
// inner loop - exit APC_PUT: 0x18, 0x1a, 0x1b, 0x9c
//for (let j = i + 1; ; ++j) {
// if (j >= length || (code = data[j]) === 0x18 || code === 0x1a || code === 0x1b || code === 0x9c || (code > 0x7f && code < NON_ASCII_PRINTABLE)) {
// this._apcParser.put(data, i, j);
// i = j - 1;
// break;
// }
//}
// for (let j = i + 1; ; ++j) {
// if (j >= length || (code = data[j]) === 0x18 || code === 0x1a || code === 0x1b || code === 0x9c || (code > 0x7f && code < NON_ASCII_PRINTABLE)) {
// this._apcParser.put(data, i, j);
// i = j - 1;
// break;
// }
// }
this._apcParser.put(data, i, i+1);
break;
case ParserAction.APC_END:
+1 -1
View File
@@ -334,7 +334,7 @@ test.describe('Parser Integration Tests', () => {
window.customApcHandlerCallStack!.push(['F', data]);
return true;
}),
term.parser.registerApcHandler({ final: 'X' }, data => {
term.parser.registerApcHandler({ final: 'X' }, data => {
window.customApcHandlerCallStack!.push(['X', data]);
return true;
})