labag 2.1.8 → 2.2.1

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.
@@ -33,10 +33,13 @@ exports.default = new mode_1.Mode(false, "greenwei", {
33
33
  let gssCount = 0;
34
34
  let allGSS = true;
35
35
  for (const p of patterns) {
36
- if (p?.name === "gss")
36
+ if (p?.name === "gss") {
37
37
  gssCount++;
38
- else
38
+ mode.variable.times += 1;
39
+ }
40
+ else {
39
41
  allGSS = false;
42
+ }
40
43
  }
41
44
  variable.count += gssCount;
42
45
  if (mode.active) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "labag",
3
- "version": "2.1.8",
3
+ "version": "2.2.1",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/index.ts CHANGED
@@ -1,13 +1,17 @@
1
1
  import { LaBaG } from "./labag";
2
2
  import { modeList, ModeName } from "./modes";
3
3
  import { LaBaGEvent, Pattern, PatternName } from "./types";
4
+ import { Mode } from "./mode";
4
5
 
5
6
  const labag = new LaBaG();
6
7
  modeList.forEach((mode) => {
7
- labag.addMode(mode);
8
+ labag.addMode(mode);
8
9
  });
9
10
  export {
10
11
  labag,
12
+ modeList,
13
+ LaBaG,
14
+ Mode,
11
15
  type LaBaGEvent,
12
16
  type Pattern,
13
17
  type PatternName,
@@ -36,8 +36,12 @@ export default new Mode(
36
36
  let gssCount = 0;
37
37
  let allGSS = true;
38
38
  for (const p of patterns) {
39
- if (p?.name === "gss") gssCount++;
40
- else allGSS = false;
39
+ if (p?.name === "gss") {
40
+ gssCount++;
41
+ mode.variable.times += 1;
42
+ } else {
43
+ allGSS = false;
44
+ }
41
45
  }
42
46
 
43
47
  variable.count += gssCount;