fix some docs

This commit is contained in:
Jörg Breitbart
2018-05-07 23:28:40 +02:00
parent a37449a8cd
commit 02893dcbb8
3 changed files with 14 additions and 7 deletions
+5 -3
View File
@@ -6,7 +6,7 @@
import { ParserState, ParserAction, IParsingState, IDcsHandler, IEscapeSequenceParser } from './Types';
/**
* Returns an array fulled with numbers between the low and high parameters (inclusive).
* Returns an array filled with numbers between the low and high parameters (right exclusive).
* @param low The low number.
* @param high The high number.
*/
@@ -34,7 +34,7 @@ export class TransitionTable {
}
/**
* Add a new transition to the transition table.
* Add a transition to the transition table.
* @param code input character code
* @param state current parser state
* @param action parser action to be done
@@ -45,7 +45,7 @@ export class TransitionTable {
}
/**
* Add transitions for multiple input characters codes.
* Add transitions for multiple input character codes.
* @param codes input character code array
* @param state current parser state
* @param action parser action to be done
@@ -497,6 +497,8 @@ export class EscapeSequenceParser implements IEscapeSequenceParser {
break;
case ParserAction.OSC_END:
if (osc && code !== 0x18 && code !== 0x1a) {
// NOTE: OSC subparsing is not part of the original parser
// we do basic identifier parsing here to offer a jump table for OSC as well
let idx = osc.indexOf(';');
if (idx === -1) {
this._oscHandlerFb(-1, osc); // this is an error (malformed OSC)
+2 -2
View File
@@ -115,7 +115,7 @@ export class InputHandler implements IInputHandler {
private _surrogateHigh: string;
constructor(
private _terminal: any,
private _terminal: any, // TODO: reestablish IInputHandlingTerminal here
private _parser: IEscapeSequenceParser = new EscapeSequenceParser())
{
this._surrogateHigh = '';
@@ -1819,7 +1819,7 @@ export class InputHandler implements IInputHandler {
/**
* OSC 0; <data> ST (set icon name + window title)
* OSC 2; <data> ST (set icon name)
* OSC 2; <data> ST (set window title)
* Proxy to set window title. Icon name is not supported.
*/
public setTitle(data: string): void {
+7 -2
View File
@@ -454,8 +454,13 @@ export interface IParsingState {
* EscapeSequenceParser handles DCS commands via separate
* subparsers that get hook/unhooked and can handle
* arbitrary amount of print data.
* NOTE: EscapeSequenceParser might call `put` several times,
* therefore you have to collect `data` until unhook is called.
* On entering a DSC sequence `hook` is called by
* `EscapeSequenceParser`. Use it to initialize or reset
* states needed to handle the current DCS sequence.
* EscapeSequenceParser will call `put` several times if the
* parsed string got splitted, therefore you might have to collect
* `data` until `unhook` is called. `unhook` marks the end
* of the current DCS sequence.
*/
export interface IDcsHandler {
hook(collect: string, params: number[], flag: number): void;