@abaplint/transpiler 2.2.15 → 2.2.16

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.
@@ -51,15 +51,21 @@ class Keywords {
51
51
  ];
52
52
  // "with"
53
53
  // "delete"
54
- keywords.push(...keywords.map(k => "!" + k));
55
- let ret = [];
54
+ const ret = [];
56
55
  for (const c of node.getChildren()) {
57
56
  if (c instanceof abaplint.Nodes.TokenNodeRegex) {
58
57
  const token = c.getFirstToken();
59
- if (keywords.some(k => k === token.getStr().toLowerCase())) {
60
- const start = token.getStart();
61
- if (!(start instanceof abaplint.VirtualPosition)) {
58
+ const start = token.getStart();
59
+ if (start instanceof abaplint.VirtualPosition) {
60
+ continue;
61
+ }
62
+ for (const k of keywords) {
63
+ const lower = token.getStr().toLowerCase();
64
+ if (k === lower
65
+ || "!" + k === lower
66
+ || lower.endsWith("~" + k)) {
62
67
  ret.push(token);
68
+ break;
63
69
  }
64
70
  }
65
71
  }
@@ -67,7 +73,7 @@ class Keywords {
67
73
  continue;
68
74
  }
69
75
  else {
70
- ret = ret.concat(this.traverse(c, file));
76
+ ret.push(...this.traverse(c, file));
71
77
  }
72
78
  }
73
79
  return ret;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler",
3
- "version": "2.2.15",
3
+ "version": "2.2.16",
4
4
  "description": "Transpiler",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/src/index.d.ts",
@@ -28,7 +28,7 @@
28
28
  "author": "abaplint",
29
29
  "license": "MIT",
30
30
  "dependencies": {
31
- "@abaplint/core": "^2.93.39",
31
+ "@abaplint/core": "^2.93.40",
32
32
  "source-map": "^0.7.4"
33
33
  },
34
34
  "devDependencies": {