mirror of
https://github.com/luxfi/consensus.git
synced 2026-09-24 00:26:58 +00:00
- Removed all Snow consensus code and dependencies - Replaced snow.Context with consensuscontext.Context - Updated all imports and references - Added comprehensive test suites for core packages - Fixed all build errors and test failures - Achieved 100% test pass rate (21 packages passing) - Improved test coverage to 30% Breaking changes: - Removed snow package entirely - Changed VM interface to use VMState instead of snow.State - Updated ChainContext structure Tests added: - core/app_error_test.go: 100% coverage - core/bootstrap_test.go: comprehensive concurrent tests - core/health_test.go: full integration tests - validators/validators_test.go: complete interface tests - version/version_test.go: 100% coverage - codec/codec_test.go: marshal/unmarshal tests - context/context_test.go: all functions tested
34 lines
1.1 KiB
JavaScript
34 lines
1.1 KiB
JavaScript
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _charcodes = require('./charcodes');
|
|
|
|
// https://tc39.github.io/ecma262/#sec-white-space
|
|
const WHITESPACE_CHARS = [
|
|
0x0009,
|
|
0x000b,
|
|
0x000c,
|
|
_charcodes.charCodes.space,
|
|
_charcodes.charCodes.nonBreakingSpace,
|
|
_charcodes.charCodes.oghamSpaceMark,
|
|
0x2000, // EN QUAD
|
|
0x2001, // EM QUAD
|
|
0x2002, // EN SPACE
|
|
0x2003, // EM SPACE
|
|
0x2004, // THREE-PER-EM SPACE
|
|
0x2005, // FOUR-PER-EM SPACE
|
|
0x2006, // SIX-PER-EM SPACE
|
|
0x2007, // FIGURE SPACE
|
|
0x2008, // PUNCTUATION SPACE
|
|
0x2009, // THIN SPACE
|
|
0x200a, // HAIR SPACE
|
|
0x202f, // NARROW NO-BREAK SPACE
|
|
0x205f, // MEDIUM MATHEMATICAL SPACE
|
|
0x3000, // IDEOGRAPHIC SPACE
|
|
0xfeff, // ZERO WIDTH NO-BREAK SPACE
|
|
]; exports.WHITESPACE_CHARS = WHITESPACE_CHARS;
|
|
|
|
const skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g; exports.skipWhiteSpace = skipWhiteSpace;
|
|
|
|
const IS_WHITESPACE = new Uint8Array(65536); exports.IS_WHITESPACE = IS_WHITESPACE;
|
|
for (const char of exports.WHITESPACE_CHARS) {
|
|
exports.IS_WHITESPACE[char] = 1;
|
|
}
|