@abaplint/core 2.113.124 → 2.113.126

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.
@@ -1506,6 +1506,7 @@ export declare class CurrentScope {
1506
1506
  getType(): ScopeType;
1507
1507
  push(stype: ScopeType, sname: string, start: Position, filename: string): void;
1508
1508
  isOO(): boolean;
1509
+ isAnyOO(): boolean;
1509
1510
  isGlobalOO(): boolean;
1510
1511
  isTypePool(): boolean;
1511
1512
  setAllowHeaderUse(name: string): void;
@@ -12,6 +12,8 @@ class Compare extends combi_1.Expression {
12
12
  const inn = (0, combi_1.seq)((0, combi_1.optPrio)("NOT"), "IN", (0, combi_1.altPrio)(_1.Source, list));
13
13
  const sopt = (0, combi_1.seq)("IS", (0, combi_1.optPrio)("NOT"), (0, combi_1.altPrio)("SUPPLIED", "BOUND", (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)("INSTANCE OF", _1.ClassName), version_1.Version.OpenABAP), "REQUESTED", "INITIAL"));
14
14
  const between = (0, combi_1.seq)((0, combi_1.optPrio)("NOT"), "BETWEEN", _1.Source, "AND", _1.Source);
15
+ // https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abennews-740_sp08-expressions.htm
16
+ // but also seems to work in v740sp05, blah
15
17
  const predicate = (0, combi_1.ver)(version_1.Version.v740sp08, _1.MethodCallChain);
16
18
  const rett = (0, combi_1.seq)(_1.Source, (0, combi_1.altPrio)((0, combi_1.seq)(_1.CompareOperator, _1.Source), inn, between, sopt));
17
19
  const fsassign = (0, combi_1.seq)(_1.SourceFieldSymbolChain, "IS", (0, combi_1.optPrio)("NOT"), "ASSIGNED");
@@ -1,10 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SQLAliasField = void 0;
4
+ const tokens_1 = require("../../1_lexer/tokens");
4
5
  const combi_1 = require("../combi");
5
6
  class SQLAliasField extends combi_1.Expression {
6
7
  getRunnable() {
7
- return (0, combi_1.regex)(/^(\/\w+\/)?\w+~(\/\w+\/)?\w+$/);
8
+ return (0, combi_1.seq)((0, combi_1.regex)(/^(\/\w+\/)?\w+~(\/\w+\/)?\w+$/), (0, combi_1.starPrio)((0, combi_1.seq)((0, combi_1.tok)(tokens_1.Dash), (0, combi_1.regex)(/^\w+$/))));
8
9
  }
9
10
  }
10
11
  exports.SQLAliasField = SQLAliasField;
@@ -9,7 +9,7 @@ class SQLSource extends combi_1.Expression {
9
9
  getRunnable() {
10
10
  const paren = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.ParenLeftW), _1.Source, (0, combi_1.tok)(tokens_1.WParenRightW));
11
11
  const at = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WAt), (0, combi_1.altPrio)(_1.SimpleSource3, paren)));
12
- return (0, combi_1.alt)(_1.SQLAliasField, _1.SimpleSource3, at);
12
+ return (0, combi_1.altPrio)(_1.SQLAliasField, _1.SimpleSource3, at);
13
13
  }
14
14
  }
15
15
  exports.SQLSource = SQLSource;
@@ -3,9 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DynproLoop = void 0;
4
4
  const Statements = require("../../2_statements/statements");
5
5
  const _combi_1 = require("./_combi");
6
+ const chain_1 = require("./chain");
6
7
  class DynproLoop {
7
8
  getMatcher() {
8
- return (0, _combi_1.beginEnd)((0, _combi_1.sta)(Statements.DynproLoop), (0, _combi_1.star)((0, _combi_1.sta)(Statements.Module)), (0, _combi_1.sta)(Statements.EndLoop));
9
+ return (0, _combi_1.beginEnd)((0, _combi_1.sta)(Statements.DynproLoop), (0, _combi_1.star)((0, _combi_1.alt)((0, _combi_1.sta)(Statements.Module), (0, _combi_1.sub)(chain_1.Chain))), (0, _combi_1.sta)(Statements.EndLoop));
9
10
  }
10
11
  }
11
12
  exports.DynproLoop = DynproLoop;
@@ -5,9 +5,10 @@ const Statements = require("../../2_statements/statements");
5
5
  const _combi_1 = require("./_combi");
6
6
  const chain_1 = require("./chain");
7
7
  const loop_1 = require("./loop");
8
+ const dynpro_loop_1 = require("./dynpro_loop");
8
9
  class ProcessAfterInput {
9
10
  getMatcher() {
10
- const pai = (0, _combi_1.star)((0, _combi_1.alt)((0, _combi_1.sta)(Statements.Module), (0, _combi_1.sta)(Statements.Field), (0, _combi_1.sta)(Statements.CallSubscreen), (0, _combi_1.sub)(chain_1.Chain), (0, _combi_1.sub)(loop_1.Loop)));
11
+ const pai = (0, _combi_1.star)((0, _combi_1.alt)((0, _combi_1.sta)(Statements.Module), (0, _combi_1.sta)(Statements.Field), (0, _combi_1.sta)(Statements.CallSubscreen), (0, _combi_1.sub)(chain_1.Chain), (0, _combi_1.sub)(dynpro_loop_1.DynproLoop), (0, _combi_1.sub)(loop_1.Loop)));
11
12
  return (0, _combi_1.seq)((0, _combi_1.sta)(Statements.ProcessAfterInput), pai);
12
13
  }
13
14
  }
@@ -429,6 +429,19 @@ class CurrentScope {
429
429
  }
430
430
  return false;
431
431
  }
432
+ isAnyOO() {
433
+ let curr = this.current;
434
+ while (curr !== undefined) {
435
+ const stype = curr.getIdentifier().stype;
436
+ if (stype === _scope_type_1.ScopeType.ClassDefinition
437
+ || stype === _scope_type_1.ScopeType.ClassImplementation
438
+ || stype === _scope_type_1.ScopeType.Interface) {
439
+ return true;
440
+ }
441
+ curr = curr.getParent();
442
+ }
443
+ return false;
444
+ }
432
445
  isGlobalOO() {
433
446
  return this.parentObj.getType() === "INTF" || this.parentObj.getType() === "CLAS";
434
447
  }
@@ -139,7 +139,7 @@ class BasicTypes {
139
139
  if (type === undefined) {
140
140
  type = (_a = this.input.scope.getDDIC().lookupNoVoid(name)) === null || _a === void 0 ? void 0 : _a.type;
141
141
  }
142
- if (type === undefined && this.input.scope.isOO() === false && this.input.scope.getDDIC().inErrorNamespace(name) === false) {
142
+ if (type === undefined && this.input.scope.isAnyOO() === false && this.input.scope.getDDIC().inErrorNamespace(name) === false) {
143
143
  this.input.scope.addReference(chain.getChildren()[0].getFirstToken(), undefined, _reference_1.ReferenceType.VoidType, this.input.filename);
144
144
  return new Types.VoidType(name);
145
145
  }
@@ -32,7 +32,6 @@ class DataDefinition {
32
32
  }
33
33
  }
34
34
  if (name) {
35
- console.dir("undef");
36
35
  return new _typed_identifier_1.TypedIdentifier(name.getFirstToken(), input.filename, new basic_1.UnknownType("DataDefinition, fallback"));
37
36
  }
38
37
  return undefined;
@@ -67,7 +67,7 @@ class Registry {
67
67
  }
68
68
  static abaplintVersion() {
69
69
  // magic, see build script "version.sh"
70
- return "2.113.124";
70
+ return "2.113.126";
71
71
  }
72
72
  getDDICReferences() {
73
73
  return this.ddicReferences;
@@ -60,7 +60,7 @@ class XMLConsistency {
60
60
  issues.push(issue_1.Issue.atRow(file, 1, "Class matching XML name not found in ABAP file", this.getMetadata().key, this.conf.severity));
61
61
  }
62
62
  }
63
- if (obj instanceof Objects.Interface) {
63
+ else if (obj instanceof Objects.Interface) {
64
64
  const name = obj.getNameFromXML();
65
65
  if (name === undefined) {
66
66
  issues.push(issue_1.Issue.atRow(file, 1, "Name undefined in XML", this.getMetadata().key, this.conf.severity));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.113.124",
3
+ "version": "2.113.126",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",
@@ -53,9 +53,9 @@
53
53
  "@microsoft/api-extractor": "^7.52.8",
54
54
  "@types/chai": "^4.3.20",
55
55
  "@types/mocha": "^10.0.10",
56
- "@types/node": "^22.15.21",
56
+ "@types/node": "^22.15.29",
57
57
  "chai": "^4.5.0",
58
- "eslint": "^9.27.0",
58
+ "eslint": "^9.28.0",
59
59
  "mocha": "^11.5.0",
60
60
  "c8": "^10.1.3",
61
61
  "source-map-support": "^0.5.21",