pip-services3-expressions-nodex
Version:
Tokenizers, parsers and expression calculators for Pip.Services in Node.js / ES2017
28 lines • 796 B
JavaScript
;
/** @module tokenizers */
Object.defineProperty(exports, "__esModule", { value: true });
exports.CharValidator = void 0;
/**
* Validates characters that are processed by Tokenizers.
*/
class CharValidator {
/**
* Default contructor to prevent creation of a class instance.
*/
constructor() {
}
static isEof(value) {
return value == CharValidator.Eof || value == -1;
}
static isEol(value) {
return value == 10 || value == 13;
}
static isDigit(value) {
return value >= CharValidator.Zero && value <= CharValidator.Nine;
}
}
CharValidator.Eof = 0xffff;
CharValidator.Zero = '0'.charCodeAt(0);
CharValidator.Nine = '9'.charCodeAt(0);
exports.CharValidator = CharValidator;
//# sourceMappingURL=CharValidator.js.map