Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 2350x 2350x 1x 1x 1x 1x 1x 1x 1x 3425x 3425x 1x 1x 1x 1x 1x 1x 1x 1x 680x 680x 1x 1x 1x 1x 1x 1x 1x 1249x 1249x 1x 1x 1x 1x 1x 1x 212x 212x 1x 1x 1x 1x 1x 1x 1x 1841x 1841x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 3722x 3722x 1x 1x | /**
* Copyright © 2020 2021 2022 7thCode.(http://seventh-code.com/)
* This software is released under the MIT License.
* opensource.org/licenses/mit-license.php
*/
"use strict";
/**
* ParserStream
*/
export class ParserStream {
private start: number = 0;
private end: number = 0;
private value: string = "";
/**
* char
*
* @remarks current position char
*/
public get char(): string {
return this.value.charAt(this.end);
}
/**
* charCode
*
* @remarks current position charCode
*/
public get charCode(): number {
return this.value.charCodeAt(this.end);
}
/**
* current
*
* @remarks
* String between restore point and current position.
*/
public get current(): string {
return this.value.substring(this.start, this.end);
}
/**
* is_terminal
*
* @remarks end?
*/
public get is_terminal(): boolean {
return (this.value.length <= this.end);
}
/*
*
*
* */
constructor(value: string) {
this.value = value;
}
/**
* restore_point
*
* @remarks save point.
*/
public restore_point(): void {
this.start = this.end;
}
/**
* restore
*
* @remarks current position restore to restore_point.
*/
public restore(): void {
this.end = this.start;
}
/**
* next
*
* @remarks Advance the parsed end by one character
*/
public next(): void {
this.end++;
}
}
|