Houjie
2025-07-24 52a3ff1bce1417b39f6872d8e8cb378e9c2ccc6f
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
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var State;
(function (State) {
    State[State["NUMERIC"] = 0] = "NUMERIC";
    State[State["ALPHA"] = 1] = "ALPHA";
    State[State["ISO_IEC_646"] = 2] = "ISO_IEC_646";
})(State || (State = {}));
var CurrentParsingState = /** @class */ (function () {
    function CurrentParsingState() {
        this.position = 0;
        this.encoding = State.NUMERIC;
    }
    CurrentParsingState.prototype.getPosition = function () {
        return this.position;
    };
    CurrentParsingState.prototype.setPosition = function (position) {
        this.position = position;
    };
    CurrentParsingState.prototype.incrementPosition = function (delta) {
        this.position += delta;
    };
    CurrentParsingState.prototype.isAlpha = function () {
        return this.encoding === State.ALPHA;
    };
    CurrentParsingState.prototype.isNumeric = function () {
        return this.encoding === State.NUMERIC;
    };
    CurrentParsingState.prototype.isIsoIec646 = function () {
        return this.encoding === State.ISO_IEC_646;
    };
    CurrentParsingState.prototype.setNumeric = function () {
        this.encoding = State.NUMERIC;
    };
    CurrentParsingState.prototype.setAlpha = function () {
        this.encoding = State.ALPHA;
    };
    CurrentParsingState.prototype.setIsoIec646 = function () {
        this.encoding = State.ISO_IEC_646;
    };
    return CurrentParsingState;
}());
exports.default = CurrentParsingState;