@famibee/skynovel 1.18.7 → 1.18.8
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/CHANGELOG.md +13 -0
- package/app.js +12 -13
- package/core/lib/sn/Grammar.d.ts.map +1 -1
- package/core/lib/sn/PropParser.d.ts +1 -1
- package/core/lib/sn/PropParser.d.ts.map +1 -1
- package/package.json +6 -6
- package/web.js +12 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
## [1.18.8](https://github.com/famibee/SKYNovel/compare/v1.18.7...v1.18.8) (2021-09-30)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* 文字列にエスケープシーケンス文法導入 ([12d2d98](https://github.com/famibee/SKYNovel/commit/12d2d9812322a4142bf743f34e0683686760a99c))
|
|
7
|
+
|
|
8
|
+
- fix: 文字列にエスケープシーケンス文法導入
|
|
9
|
+
- クォーテーション("や')、ハッシュマーク(#)内にその文字を入れられる
|
|
10
|
+
- docs: 【開発者情報】更新、エスケープシーケンスについて追記
|
|
11
|
+
- docs: 【開発者情報】開発環境ビュー、テンプレウイザード、設定画面のスナップショット修正
|
|
12
|
+
|
|
13
|
+
|
|
1
14
|
## [1.18.7](https://github.com/famibee/SKYNovel/compare/v1.18.6...v1.18.7) (2021-09-22)
|
|
2
15
|
|
|
3
16
|
|
package/app.js
CHANGED
|
@@ -73395,13 +73395,18 @@ class Grammar {
|
|
|
73395
73395
|
setEscape(ce) {
|
|
73396
73396
|
if (this.hC2M && (ce in this.hC2M))
|
|
73397
73397
|
throw '[エスケープ文字] char【' + ce + '】が登録済みの括弧マクロまたは一文字マクロです';
|
|
73398
|
+
const ces = ce ?? '\\';
|
|
73398
73399
|
this.REG_TOKEN = new RegExp((ce ? `\\${ce}\\S|` : '') +
|
|
73399
73400
|
'\\n+' +
|
|
73400
73401
|
'|\\t+' +
|
|
73401
73402
|
`|\\[let_ml\\s+[^\\]]+\\]` +
|
|
73402
73403
|
`.+?` +
|
|
73403
73404
|
`(?=\\[endlet_ml[\\]\\s])` +
|
|
73404
|
-
`|\\[(?:[^"'#;\\]]
|
|
73405
|
+
`|\\[(?:[^"'#;\\]]+|` + (ces
|
|
73406
|
+
? `(?:"(?:\\${ces}["'#\\n]|[^"])*"|` +
|
|
73407
|
+
`'(?:\\${ces}["'#\\n]|[^'])*'|` +
|
|
73408
|
+
`\\#(?:\\${ces}["'#\\n]|[^#])*\\#)`
|
|
73409
|
+
: `(["'#]).*?\\1`) + `|;[^\\n]*)*?]` +
|
|
73405
73410
|
'|;[^\\n]*' +
|
|
73406
73411
|
'|&[^&\\n]+&' +
|
|
73407
73412
|
'|&&?[^;\\n\\t&]+' +
|
|
@@ -75102,7 +75107,7 @@ class Main {
|
|
|
75102
75107
|
this.appPixi.view.id = CmnLib_1.CmnLib.SN_ID;
|
|
75103
75108
|
}
|
|
75104
75109
|
this.val = new Variable_1.Variable(this.cfg, this.hTag);
|
|
75105
|
-
this.prpPrs = new PropParser_1.PropParser(this.val);
|
|
75110
|
+
this.prpPrs = new PropParser_1.PropParser(this.val, this.cfg.oCfg.init.escape ?? '\\');
|
|
75106
75111
|
await Promise.all(this.sys.init(this.hTag, this.appPixi, this.val, this));
|
|
75107
75112
|
this.hTag.title({ text: this.cfg.oCfg.book.title || 'SKYNovel' });
|
|
75108
75113
|
this.sndMng = new SoundMng_1.SoundMng(this.cfg, this.hTag, this.val, this, this.sys);
|
|
@@ -75353,7 +75358,7 @@ exports.PropParser = void 0;
|
|
|
75353
75358
|
const P = __importStar(__webpack_require__(/*! parsimmon */ "./node_modules/parsimmon/build/parsimmon.umd.min.js"));
|
|
75354
75359
|
const CmnLib_1 = __webpack_require__(/*! ./CmnLib */ "./core/src/sn/CmnLib.ts");
|
|
75355
75360
|
class PropParser {
|
|
75356
|
-
constructor(val) {
|
|
75361
|
+
constructor(val, ce = '\\') {
|
|
75357
75362
|
this.val = val;
|
|
75358
75363
|
this.parser = null;
|
|
75359
75364
|
this.hFnc = {
|
|
@@ -75471,9 +75476,7 @@ class PropParser {
|
|
|
75471
75476
|
return P.alt.apply(null, ps);
|
|
75472
75477
|
}
|
|
75473
75478
|
function PREFIX(operatorsParser, nextParser) {
|
|
75474
|
-
const parser = P.lazy(() =>
|
|
75475
|
-
return P.seq(operatorsParser, parser).or(nextParser);
|
|
75476
|
-
});
|
|
75479
|
+
const parser = P.lazy(() => P.seq(operatorsParser, parser).or(nextParser));
|
|
75477
75480
|
return parser;
|
|
75478
75481
|
}
|
|
75479
75482
|
function BINARY_RIGHT(operatorsParser, nextParser) {
|
|
@@ -75481,11 +75484,7 @@ class PropParser {
|
|
|
75481
75484
|
return parser;
|
|
75482
75485
|
}
|
|
75483
75486
|
function BINARY_LEFT(operatorsParser, nextParser) {
|
|
75484
|
-
return P.seqMap(nextParser, P.seq(operatorsParser, nextParser).many(), (first, rest) =>
|
|
75485
|
-
return rest.reduce((acc, ch) => {
|
|
75486
|
-
return [ch[0], acc, ch[1]];
|
|
75487
|
-
}, first);
|
|
75488
|
-
});
|
|
75487
|
+
return P.seqMap(nextParser, P.seq(operatorsParser, nextParser).many(), (first, rest) => rest.reduce((acc, ch) => [ch[0], acc, ch[1]], first));
|
|
75489
75488
|
}
|
|
75490
75489
|
const Num = P.alt(P.alt(P.regex(/-?(0|[1-9][0-9]*)\.[0-9]+/), P.regex(/0x[0-9a-fA-F]+/)).map(Number), P.alt(P.regex(/-?(0|[1-9][0-9]*)/)).map(n => (0, CmnLib_1.int)(n)))
|
|
75491
75490
|
.map(str => ['!num!', str])
|
|
@@ -75496,8 +75495,8 @@ class PropParser {
|
|
|
75496
75495
|
.map(b => ['!bool!', b === 'true'])
|
|
75497
75496
|
.desc('boolean');
|
|
75498
75497
|
const StringLiteral = P
|
|
75499
|
-
.regex(
|
|
75500
|
-
.map(b => ['!str!', b.slice(1, -1)])
|
|
75498
|
+
.regex(new RegExp(`(?:"(?:\\${ce}["'#\\n]|[^"])*"|'(?:\\${ce}["'#\\n]|[^'])*'|\\#(?:\\${ce}["'#\\n]|[^#])*\\#)`))
|
|
75499
|
+
.map(b => ['!str!', b.slice(1, -1).replaceAll(ce, '')])
|
|
75501
75500
|
.desc('string');
|
|
75502
75501
|
const REG_BRACKETS = /\[[^\]]+\]/g;
|
|
75503
75502
|
const VarLiteral = P
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Grammar.d.ts","sourceRoot":"","sources":["../../src/sn/Grammar.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,MAAM,EAAE,IAAI,EAAC,MAAM,gBAAgB,CAAC;AAG5C,eAAO,MAAM,OAAO,QAAuB,CAAC;AAC5C,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,CAO9E;AACD,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAMnD;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG;IAC7C,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB,CAWA;AAED,qBAAa,OAAO;;IAGnB,SAAS,EAAG,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,EAAE,MAAM;
|
|
1
|
+
{"version":3,"file":"Grammar.d.ts","sourceRoot":"","sources":["../../src/sn/Grammar.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,MAAM,EAAE,IAAI,EAAC,MAAM,gBAAgB,CAAC;AAG5C,eAAO,MAAM,OAAO,QAAuB,CAAC;AAC5C,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,CAO9E;AACD,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAMnD;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG;IAC7C,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB,CAWA;AAED,qBAAa,OAAO;;IAGnB,SAAS,EAAG,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,EAAE,MAAM;IA8BpB,aAAa,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;IAyB1D,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;IAkBnE,OAAO,CAAC,WAAW,CAAW;IAC9B,OAAO,CAAC,MAAM,CAAoB;IAClC,OAAO,CAAC,SAAS,CAAO;IACxB,OAAO,CAAC,aAAa,CAAM;IAC3B,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM;IAO3B,OAAO,CAAC,IAAI,CAA4B;IACxC,eAAe,EAAG,MAAM,CAAC;IACzB,yBAAyB,QAAS,MAAM,8BA4BvC;CAED"}
|
|
@@ -2,7 +2,7 @@ import { IPropParser, IVariable } from './CmnInterface';
|
|
|
2
2
|
export declare class PropParser implements IPropParser {
|
|
3
3
|
private readonly val;
|
|
4
4
|
private parser;
|
|
5
|
-
constructor(val: IVariable);
|
|
5
|
+
constructor(val: IVariable, ce?: string);
|
|
6
6
|
parse(s: string): any;
|
|
7
7
|
private calc;
|
|
8
8
|
private hFnc;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PropParser.d.ts","sourceRoot":"","sources":["../../src/sn/PropParser.ts"],"names":[],"mappings":"AASA,OAAO,EAAC,WAAW,EAAE,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAKtD,qBAAa,UAAW,YAAW,WAAW;IAGjC,OAAO,CAAC,QAAQ,CAAC,GAAG;IAFhC,OAAO,CAAC,MAAM,CAAa;gBAEE,GAAG,EAAE,SAAS;
|
|
1
|
+
{"version":3,"file":"PropParser.d.ts","sourceRoot":"","sources":["../../src/sn/PropParser.ts"],"names":[],"mappings":"AASA,OAAO,EAAC,WAAW,EAAE,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAKtD,qBAAa,UAAW,YAAW,WAAW;IAGjC,OAAO,CAAC,QAAQ,CAAC,GAAG;IAFhC,OAAO,CAAC,MAAM,CAAa;gBAEE,GAAG,EAAE,SAAS,EAAE,EAAE,SAAO;IAiItD,KAAK,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG;IAUrB,OAAO,CAAC,IAAI;IAQZ,OAAO,CAAC,IAAI,CA6HX;IACD,OAAO,CAAC,aAAa;IAMrB,OAAO,CAAC,QAAQ,CAAC,YAAY,CACoC;IACjE,OAAO,CAAC,YAAY;IAWpB,eAAe,QAAS,MAAM,YAEvB;IAGP,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAC0B;IAGzD,MAAM,CAAC,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG;QAAC,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;KAAC,GAAG,SAAS;IAczE,OAAO,CAAC,MAAM,CAAC,cAAc;CAuB7B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@famibee/skynovel",
|
|
3
|
-
"version": "1.18.
|
|
3
|
+
"version": "1.18.8",
|
|
4
4
|
"description": "webgl novelgame framework",
|
|
5
5
|
"main": "core/web.js",
|
|
6
6
|
"types": "core/lib/index.d.ts",
|
|
@@ -29,24 +29,24 @@
|
|
|
29
29
|
"@types/electron-json-storage": "^4.5.0",
|
|
30
30
|
"@types/fs-extra": "^9.0.13",
|
|
31
31
|
"@types/mocha": "^9.0.0",
|
|
32
|
-
"@types/node": "^16.
|
|
32
|
+
"@types/node": "^16.10.2",
|
|
33
33
|
"@types/parsimmon": "^1.10.6",
|
|
34
34
|
"@types/platform": "^1.3.4",
|
|
35
|
-
"@types/power-assert": "^1.5.
|
|
35
|
+
"@types/power-assert": "^1.5.5",
|
|
36
36
|
"@types/store": "^2.0.2",
|
|
37
37
|
"@types/tar-fs": "^2.0.1",
|
|
38
38
|
"@types/xml2js": "^0.4.9",
|
|
39
39
|
"electron": "^15.0.0",
|
|
40
|
-
"mocha": "^9.1.
|
|
40
|
+
"mocha": "^9.1.2",
|
|
41
41
|
"power-assert": "^1.6.1",
|
|
42
42
|
"rimraf": "^3.0.2",
|
|
43
43
|
"semantic-release": "^18.0.0",
|
|
44
44
|
"ts-loader": "^9.2.6",
|
|
45
45
|
"ts-node": "^10.2.1",
|
|
46
46
|
"typescript": "^4.4.3",
|
|
47
|
-
"webpack": "^5.
|
|
47
|
+
"webpack": "^5.55.1",
|
|
48
48
|
"webpack-cli": "^4.8.0",
|
|
49
|
-
"webpack-dev-server": "^4.
|
|
49
|
+
"webpack-dev-server": "^4.3.0"
|
|
50
50
|
},
|
|
51
51
|
"scripts": {
|
|
52
52
|
"build": "npm run wp && npm run test",
|
package/web.js
CHANGED
|
@@ -74813,13 +74813,18 @@ class Grammar {
|
|
|
74813
74813
|
setEscape(ce) {
|
|
74814
74814
|
if (this.hC2M && (ce in this.hC2M))
|
|
74815
74815
|
throw '[エスケープ文字] char【' + ce + '】が登録済みの括弧マクロまたは一文字マクロです';
|
|
74816
|
+
const ces = ce ?? '\\';
|
|
74816
74817
|
this.REG_TOKEN = new RegExp((ce ? `\\${ce}\\S|` : '') +
|
|
74817
74818
|
'\\n+' +
|
|
74818
74819
|
'|\\t+' +
|
|
74819
74820
|
`|\\[let_ml\\s+[^\\]]+\\]` +
|
|
74820
74821
|
`.+?` +
|
|
74821
74822
|
`(?=\\[endlet_ml[\\]\\s])` +
|
|
74822
|
-
`|\\[(?:[^"'#;\\]]
|
|
74823
|
+
`|\\[(?:[^"'#;\\]]+|` + (ces
|
|
74824
|
+
? `(?:"(?:\\${ces}["'#\\n]|[^"])*"|` +
|
|
74825
|
+
`'(?:\\${ces}["'#\\n]|[^'])*'|` +
|
|
74826
|
+
`\\#(?:\\${ces}["'#\\n]|[^#])*\\#)`
|
|
74827
|
+
: `(["'#]).*?\\1`) + `|;[^\\n]*)*?]` +
|
|
74823
74828
|
'|;[^\\n]*' +
|
|
74824
74829
|
'|&[^&\\n]+&' +
|
|
74825
74830
|
'|&&?[^;\\n\\t&]+' +
|
|
@@ -76520,7 +76525,7 @@ class Main {
|
|
|
76520
76525
|
this.appPixi.view.id = CmnLib_1.CmnLib.SN_ID;
|
|
76521
76526
|
}
|
|
76522
76527
|
this.val = new Variable_1.Variable(this.cfg, this.hTag);
|
|
76523
|
-
this.prpPrs = new PropParser_1.PropParser(this.val);
|
|
76528
|
+
this.prpPrs = new PropParser_1.PropParser(this.val, this.cfg.oCfg.init.escape ?? '\\');
|
|
76524
76529
|
await Promise.all(this.sys.init(this.hTag, this.appPixi, this.val, this));
|
|
76525
76530
|
this.hTag.title({ text: this.cfg.oCfg.book.title || 'SKYNovel' });
|
|
76526
76531
|
this.sndMng = new SoundMng_1.SoundMng(this.cfg, this.hTag, this.val, this, this.sys);
|
|
@@ -76771,7 +76776,7 @@ exports.PropParser = void 0;
|
|
|
76771
76776
|
const P = __importStar(__webpack_require__(/*! parsimmon */ "./node_modules/parsimmon/build/parsimmon.umd.min.js"));
|
|
76772
76777
|
const CmnLib_1 = __webpack_require__(/*! ./CmnLib */ "./core/src/sn/CmnLib.ts");
|
|
76773
76778
|
class PropParser {
|
|
76774
|
-
constructor(val) {
|
|
76779
|
+
constructor(val, ce = '\\') {
|
|
76775
76780
|
this.val = val;
|
|
76776
76781
|
this.parser = null;
|
|
76777
76782
|
this.hFnc = {
|
|
@@ -76889,9 +76894,7 @@ class PropParser {
|
|
|
76889
76894
|
return P.alt.apply(null, ps);
|
|
76890
76895
|
}
|
|
76891
76896
|
function PREFIX(operatorsParser, nextParser) {
|
|
76892
|
-
const parser = P.lazy(() =>
|
|
76893
|
-
return P.seq(operatorsParser, parser).or(nextParser);
|
|
76894
|
-
});
|
|
76897
|
+
const parser = P.lazy(() => P.seq(operatorsParser, parser).or(nextParser));
|
|
76895
76898
|
return parser;
|
|
76896
76899
|
}
|
|
76897
76900
|
function BINARY_RIGHT(operatorsParser, nextParser) {
|
|
@@ -76899,11 +76902,7 @@ class PropParser {
|
|
|
76899
76902
|
return parser;
|
|
76900
76903
|
}
|
|
76901
76904
|
function BINARY_LEFT(operatorsParser, nextParser) {
|
|
76902
|
-
return P.seqMap(nextParser, P.seq(operatorsParser, nextParser).many(), (first, rest) =>
|
|
76903
|
-
return rest.reduce((acc, ch) => {
|
|
76904
|
-
return [ch[0], acc, ch[1]];
|
|
76905
|
-
}, first);
|
|
76906
|
-
});
|
|
76905
|
+
return P.seqMap(nextParser, P.seq(operatorsParser, nextParser).many(), (first, rest) => rest.reduce((acc, ch) => [ch[0], acc, ch[1]], first));
|
|
76907
76906
|
}
|
|
76908
76907
|
const Num = P.alt(P.alt(P.regex(/-?(0|[1-9][0-9]*)\.[0-9]+/), P.regex(/0x[0-9a-fA-F]+/)).map(Number), P.alt(P.regex(/-?(0|[1-9][0-9]*)/)).map(n => (0, CmnLib_1.int)(n)))
|
|
76909
76908
|
.map(str => ['!num!', str])
|
|
@@ -76914,8 +76913,8 @@ class PropParser {
|
|
|
76914
76913
|
.map(b => ['!bool!', b === 'true'])
|
|
76915
76914
|
.desc('boolean');
|
|
76916
76915
|
const StringLiteral = P
|
|
76917
|
-
.regex(
|
|
76918
|
-
.map(b => ['!str!', b.slice(1, -1)])
|
|
76916
|
+
.regex(new RegExp(`(?:"(?:\\${ce}["'#\\n]|[^"])*"|'(?:\\${ce}["'#\\n]|[^'])*'|\\#(?:\\${ce}["'#\\n]|[^#])*\\#)`))
|
|
76917
|
+
.map(b => ['!str!', b.slice(1, -1).replaceAll(ce, '')])
|
|
76919
76918
|
.desc('string');
|
|
76920
76919
|
const REG_BRACKETS = /\[[^\]]+\]/g;
|
|
76921
76920
|
const VarLiteral = P
|