"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ParsingState = void 0;
class ParsingState {
    constructor(ordinal, label) {
        this.ordinal = ordinal;
        this.label = label;
    }
    isBetterThan(o) {
        return this.ordinal < o.ordinal;
    }
    toString() {
        return this.label;
    }
    equals(o) {
        if (!(o instanceof ParsingState))
            return false;
        return this.ordinal === o.ordinal;
    }
}
exports.ParsingState = ParsingState;
ParsingState.SUCCESSFUL = new ParsingState(0, 'SUCCESSFUL');
ParsingState.END_OF_INPUT = new ParsingState(1, 'END_OF_INPUT');
ParsingState.FAILED = new ParsingState(2, 'FAILED');
ParsingState.NOT_PARSED = new ParsingState(3, 'NOT_PARSED');
//# sourceMappingURL=ParsingState.js.map