@intlify/message-compiler 9.2.0-beta.3 → 9.2.0-beta.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/message-compiler.cjs.js +10 -15
- package/dist/message-compiler.cjs.prod.js +10 -15
- package/dist/message-compiler.esm-browser.js +11 -3234
- package/dist/message-compiler.esm-browser.prod.js +3 -3
- package/dist/message-compiler.esm-bundler.js +11 -76
- package/dist/message-compiler.global.js +12 -3235
- package/dist/message-compiler.global.prod.js +3 -3
- package/index.mjs +1 -0
- package/package.json +15 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* message-compiler v9.2.0-beta.
|
|
3
|
-
* (c)
|
|
2
|
+
* message-compiler v9.2.0-beta.30
|
|
3
|
+
* (c) 2022 kazuya kawaguchi
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
@@ -432,49 +432,44 @@ function createTokenizer(source, options = {}) {
|
|
|
432
432
|
return num;
|
|
433
433
|
}
|
|
434
434
|
function readText(scnr) {
|
|
435
|
-
|
|
435
|
+
let buf = '';
|
|
436
|
+
while (true) {
|
|
436
437
|
const ch = scnr.currentChar();
|
|
437
438
|
if (ch === "{" /* BraceLeft */ ||
|
|
438
439
|
ch === "}" /* BraceRight */ ||
|
|
439
440
|
ch === "@" /* LinkedAlias */ ||
|
|
441
|
+
ch === "|" /* Pipe */ ||
|
|
440
442
|
!ch) {
|
|
441
|
-
|
|
443
|
+
break;
|
|
442
444
|
}
|
|
443
445
|
else if (ch === "%" /* Modulo */) {
|
|
444
446
|
if (isTextStart(scnr)) {
|
|
445
447
|
buf += ch;
|
|
446
448
|
scnr.next();
|
|
447
|
-
return fn(buf);
|
|
448
449
|
}
|
|
449
450
|
else {
|
|
450
|
-
|
|
451
|
+
break;
|
|
451
452
|
}
|
|
452
453
|
}
|
|
453
|
-
else if (ch === "|" /* Pipe */) {
|
|
454
|
-
return buf;
|
|
455
|
-
}
|
|
456
454
|
else if (ch === CHAR_SP || ch === CHAR_LF) {
|
|
457
455
|
if (isTextStart(scnr)) {
|
|
458
456
|
buf += ch;
|
|
459
457
|
scnr.next();
|
|
460
|
-
return fn(buf);
|
|
461
458
|
}
|
|
462
459
|
else if (isPluralStart(scnr)) {
|
|
463
|
-
|
|
460
|
+
break;
|
|
464
461
|
}
|
|
465
462
|
else {
|
|
466
463
|
buf += ch;
|
|
467
464
|
scnr.next();
|
|
468
|
-
return fn(buf);
|
|
469
465
|
}
|
|
470
466
|
}
|
|
471
467
|
else {
|
|
472
468
|
buf += ch;
|
|
473
469
|
scnr.next();
|
|
474
|
-
return fn(buf);
|
|
475
470
|
}
|
|
476
|
-
}
|
|
477
|
-
return
|
|
471
|
+
}
|
|
472
|
+
return buf;
|
|
478
473
|
}
|
|
479
474
|
function readNamedIdentifier(scnr) {
|
|
480
475
|
skipSpaces(scnr);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* message-compiler v9.2.0-beta.
|
|
3
|
-
* (c)
|
|
2
|
+
* message-compiler v9.2.0-beta.30
|
|
3
|
+
* (c) 2022 kazuya kawaguchi
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
@@ -431,49 +431,44 @@ function createTokenizer(source, options = {}) {
|
|
|
431
431
|
return num;
|
|
432
432
|
}
|
|
433
433
|
function readText(scnr) {
|
|
434
|
-
|
|
434
|
+
let buf = '';
|
|
435
|
+
while (true) {
|
|
435
436
|
const ch = scnr.currentChar();
|
|
436
437
|
if (ch === "{" /* BraceLeft */ ||
|
|
437
438
|
ch === "}" /* BraceRight */ ||
|
|
438
439
|
ch === "@" /* LinkedAlias */ ||
|
|
440
|
+
ch === "|" /* Pipe */ ||
|
|
439
441
|
!ch) {
|
|
440
|
-
|
|
442
|
+
break;
|
|
441
443
|
}
|
|
442
444
|
else if (ch === "%" /* Modulo */) {
|
|
443
445
|
if (isTextStart(scnr)) {
|
|
444
446
|
buf += ch;
|
|
445
447
|
scnr.next();
|
|
446
|
-
return fn(buf);
|
|
447
448
|
}
|
|
448
449
|
else {
|
|
449
|
-
|
|
450
|
+
break;
|
|
450
451
|
}
|
|
451
452
|
}
|
|
452
|
-
else if (ch === "|" /* Pipe */) {
|
|
453
|
-
return buf;
|
|
454
|
-
}
|
|
455
453
|
else if (ch === CHAR_SP || ch === CHAR_LF) {
|
|
456
454
|
if (isTextStart(scnr)) {
|
|
457
455
|
buf += ch;
|
|
458
456
|
scnr.next();
|
|
459
|
-
return fn(buf);
|
|
460
457
|
}
|
|
461
458
|
else if (isPluralStart(scnr)) {
|
|
462
|
-
|
|
459
|
+
break;
|
|
463
460
|
}
|
|
464
461
|
else {
|
|
465
462
|
buf += ch;
|
|
466
463
|
scnr.next();
|
|
467
|
-
return fn(buf);
|
|
468
464
|
}
|
|
469
465
|
}
|
|
470
466
|
else {
|
|
471
467
|
buf += ch;
|
|
472
468
|
scnr.next();
|
|
473
|
-
return fn(buf);
|
|
474
469
|
}
|
|
475
|
-
}
|
|
476
|
-
return
|
|
470
|
+
}
|
|
471
|
+
return buf;
|
|
477
472
|
}
|
|
478
473
|
function readNamedIdentifier(scnr) {
|
|
479
474
|
skipSpaces(scnr);
|