@abaplint/core 2.113.89 → 2.113.91

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.
@@ -5254,15 +5254,27 @@ declare class PrivateSection implements IStructure {
5254
5254
  getMatcher(): IStructureRunnable;
5255
5255
  }
5256
5256
 
5257
- declare class ProcessAfterInput implements IStatement {
5257
+ declare class ProcessAfterInput implements IStructure {
5258
+ getMatcher(): IStructureRunnable;
5259
+ }
5260
+
5261
+ declare class ProcessAfterInput_2 implements IStatement {
5258
5262
  getMatcher(): IStatementRunnable;
5259
5263
  }
5260
5264
 
5261
- declare class ProcessBeforeOutput implements IStatement {
5265
+ declare class ProcessBeforeOutput implements IStructure {
5266
+ getMatcher(): IStructureRunnable;
5267
+ }
5268
+
5269
+ declare class ProcessBeforeOutput_2 implements IStatement {
5262
5270
  getMatcher(): IStatementRunnable;
5263
5271
  }
5264
5272
 
5265
- declare class ProcessOnValueRequest implements IStatement {
5273
+ declare class ProcessOnValueRequest implements IStructure {
5274
+ getMatcher(): IStructureRunnable;
5275
+ }
5276
+
5277
+ declare class ProcessOnValueRequest_2 implements IStatement {
5266
5278
  getMatcher(): IStatementRunnable;
5267
5279
  }
5268
5280
 
@@ -6496,9 +6508,9 @@ declare namespace Statements {
6496
6508
  DataBegin,
6497
6509
  DataEnd,
6498
6510
  TypeBegin,
6499
- ProcessAfterInput,
6500
- ProcessBeforeOutput,
6501
- ProcessOnValueRequest,
6511
+ ProcessAfterInput_2 as ProcessAfterInput,
6512
+ ProcessBeforeOutput_2 as ProcessBeforeOutput,
6513
+ ProcessOnValueRequest_2 as ProcessOnValueRequest,
6502
6514
  TypeEnd,
6503
6515
  RaiseEvent,
6504
6516
  Cleanup_2 as Cleanup,
@@ -6631,10 +6643,10 @@ declare namespace Structures {
6631
6643
  Case,
6632
6644
  CatchSystemExceptions,
6633
6645
  Catch,
6646
+ Chain,
6634
6647
  ClassData,
6635
6648
  ClassDefinition,
6636
6649
  ClassGlobal,
6637
- Chain,
6638
6650
  ClassImplementation,
6639
6651
  Cleanup,
6640
6652
  Constants,
@@ -6659,6 +6671,9 @@ declare namespace Structures {
6659
6671
  Normal,
6660
6672
  OnChange,
6661
6673
  PrivateSection,
6674
+ ProcessAfterInput,
6675
+ ProcessBeforeOutput,
6676
+ ProcessOnValueRequest,
6662
6677
  ProtectedSection,
6663
6678
  Provide,
6664
6679
  PublicSection,
@@ -4,7 +4,7 @@ exports.SQLAliasField = void 0;
4
4
  const combi_1 = require("../combi");
5
5
  class SQLAliasField extends combi_1.Expression {
6
6
  getRunnable() {
7
- return (0, combi_1.regex)(/^(\/\w+\/)?\w+~\w+$/);
7
+ return (0, combi_1.regex)(/^(\/\w+\/)?\w+~(\/\w+\/)?\w+$/);
8
8
  }
9
9
  }
10
10
  exports.SQLAliasField = SQLAliasField;
@@ -25,8 +25,12 @@ class SQLFunction extends combi_1.Expression {
25
25
  const round = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)((0, combi_1.regex)(/^round$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
26
26
  const upper = (0, combi_1.ver)(version_1.Version.v751, (0, combi_1.seq)((0, combi_1.regex)(/^upper$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, (0, combi_1.tok)(tokens_1.WParenRightW)));
27
27
  const uuid = (0, combi_1.ver)(version_1.Version.v754, (0, combi_1.seq)((0, combi_1.regex)(/^uuid$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), (0, combi_1.tok)(tokens_1.WParenRightW)));
28
- const concat_with_space = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)((0, combi_1.regex)(/^uuid$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, commaParam, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
29
- return (0, combi_1.altPrio)(uuid, abs, ceil, floor, cast, div, mod, coalesce, concat, replace, length, lower, upper, round, concat_with_space);
28
+ const concat_with_space = (0, combi_1.ver)(version_1.Version.v751, (0, combi_1.seq)((0, combi_1.regex)(/^concat_with_space$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, commaParam, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
29
+ // dunno if the version for substring is correct
30
+ const substring = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)((0, combi_1.regex)(/^substring$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, commaParam, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
31
+ const ltrim = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)((0, combi_1.regex)(/^ltrim$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
32
+ const rtrim = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)((0, combi_1.regex)(/^rtrim$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
33
+ return (0, combi_1.altPrio)(uuid, abs, ceil, floor, cast, div, mod, coalesce, concat, replace, length, lower, upper, round, concat_with_space, ltrim, rtrim, substring);
30
34
  }
31
35
  }
32
36
  exports.SQLFunction = SQLFunction;
@@ -8,7 +8,7 @@ class ModifyLine {
8
8
  getMatcher() {
9
9
  const onOff = (0, combi_1.alt)("ON", "OFF");
10
10
  const eq = (0, combi_1.seq)("=", expressions_1.Source);
11
- const form = (0, combi_1.seq)((0, combi_1.alt)("INVERSE", "INPUT", "COLOR", "HOTSPOT"), (0, combi_1.alt)(eq, onOff));
11
+ const form = (0, combi_1.seq)((0, combi_1.alt)("INVERSE", "INPUT", "COLOR", "HOTSPOT"), (0, combi_1.opt)((0, combi_1.alt)(eq, onOff)));
12
12
  const from = (0, combi_1.seq)("FROM", expressions_1.Source);
13
13
  const value = (0, combi_1.seq)("FIELD VALUE", (0, combi_1.plus)((0, combi_1.seq)(expressions_1.Source, (0, combi_1.optPrio)(from))));
14
14
  const format = (0, combi_1.seq)("FIELD FORMAT", expressions_1.Source, (0, combi_1.opt)(form));
@@ -6,7 +6,8 @@ const expressions_1 = require("../expressions");
6
6
  const version_1 = require("../../../version");
7
7
  class VerificationMessage {
8
8
  getMatcher() {
9
- const ret = (0, combi_1.seq)("VERIFICATION-MESSAGE", expressions_1.Source, expressions_1.Source);
9
+ const priority = (0, combi_1.seq)("PRIORITY", expressions_1.Source);
10
+ const ret = (0, combi_1.seq)("VERIFICATION-MESSAGE", expressions_1.Source, expressions_1.Source, (0, combi_1.opt)(priority));
10
11
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
11
12
  }
12
13
  }
@@ -1,15 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DynproLogic = void 0;
4
- const Statements = require("../../2_statements/statements");
4
+ const Structures = require("./");
5
5
  const _combi_1 = require("./_combi");
6
- const chain_1 = require("./chain");
7
6
  class DynproLogic {
8
7
  getMatcher() {
9
- 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)));
10
- const pbo = (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)));
11
- const pov = (0, _combi_1.star)((0, _combi_1.sta)(Statements.Field));
12
- return (0, _combi_1.seq)((0, _combi_1.sta)(Statements.ProcessBeforeOutput), pbo, (0, _combi_1.sta)(Statements.ProcessAfterInput), pai, (0, _combi_1.opt)((0, _combi_1.seq)((0, _combi_1.sta)(Statements.ProcessOnValueRequest), pov)));
8
+ return (0, _combi_1.seq)((0, _combi_1.sub)(Structures.ProcessBeforeOutput), (0, _combi_1.sub)(Structures.ProcessAfterInput), (0, _combi_1.opt)((0, _combi_1.sub)(Structures.ProcessOnValueRequest)));
13
9
  }
14
10
  }
15
11
  exports.DynproLogic = DynproLogic;
@@ -23,10 +23,10 @@ __exportStar(require("./case_type"), exports);
23
23
  __exportStar(require("./case"), exports);
24
24
  __exportStar(require("./catch_system_exceptions"), exports);
25
25
  __exportStar(require("./catch"), exports);
26
+ __exportStar(require("./chain"), exports);
26
27
  __exportStar(require("./class_data"), exports);
27
28
  __exportStar(require("./class_definition"), exports);
28
29
  __exportStar(require("./class_global"), exports);
29
- __exportStar(require("./chain"), exports);
30
30
  __exportStar(require("./class_implementation"), exports);
31
31
  __exportStar(require("./cleanup"), exports);
32
32
  __exportStar(require("./constants"), exports);
@@ -51,6 +51,9 @@ __exportStar(require("./module"), exports);
51
51
  __exportStar(require("./normal"), exports);
52
52
  __exportStar(require("./on_change"), exports);
53
53
  __exportStar(require("./private_section"), exports);
54
+ __exportStar(require("./process_after_input"), exports);
55
+ __exportStar(require("./process_before_output"), exports);
56
+ __exportStar(require("./process_on_value_request"), exports);
54
57
  __exportStar(require("./protected_section"), exports);
55
58
  __exportStar(require("./provide"), exports);
56
59
  __exportStar(require("./public_section"), exports);
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ProcessAfterInput = void 0;
4
+ const Statements = require("../../2_statements/statements");
5
+ const _combi_1 = require("./_combi");
6
+ const chain_1 = require("./chain");
7
+ class ProcessAfterInput {
8
+ getMatcher() {
9
+ 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)));
10
+ return (0, _combi_1.seq)((0, _combi_1.sta)(Statements.ProcessAfterInput), pai);
11
+ }
12
+ }
13
+ exports.ProcessAfterInput = ProcessAfterInput;
14
+ //# sourceMappingURL=process_after_input.js.map
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ProcessBeforeOutput = void 0;
4
+ const Statements = require("../../2_statements/statements");
5
+ const _combi_1 = require("./_combi");
6
+ class ProcessBeforeOutput {
7
+ getMatcher() {
8
+ const pbo = (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)));
9
+ return (0, _combi_1.seq)((0, _combi_1.sta)(Statements.ProcessBeforeOutput), pbo);
10
+ }
11
+ }
12
+ exports.ProcessBeforeOutput = ProcessBeforeOutput;
13
+ //# sourceMappingURL=process_before_output.js.map
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ProcessOnValueRequest = void 0;
4
+ const Statements = require("../../2_statements/statements");
5
+ const _combi_1 = require("./_combi");
6
+ class ProcessOnValueRequest {
7
+ getMatcher() {
8
+ const pov = (0, _combi_1.star)((0, _combi_1.sta)(Statements.Field));
9
+ return (0, _combi_1.seq)((0, _combi_1.sta)(Statements.ProcessOnValueRequest), pov);
10
+ }
11
+ }
12
+ exports.ProcessOnValueRequest = ProcessOnValueRequest;
13
+ //# sourceMappingURL=process_on_value_request.js.map
@@ -28,6 +28,13 @@ class CDSDetermineTypes {
28
28
  continue;
29
29
  }
30
30
  if ((source === null || source === void 0 ? void 0 : source.name) === undefined) {
31
+ if (prefixUpper.startsWith("_")) {
32
+ components.push({
33
+ name: f.name,
34
+ type: new basic_1.VoidType("DDLS:association"),
35
+ });
36
+ continue;
37
+ }
31
38
  components.push({
32
39
  name: f.name,
33
40
  type: new basic_1.UnknownType("CDS parser error, unknown source, " + ddlsName),
@@ -7,15 +7,22 @@ const syntax_1 = require("../abap/5_syntax/syntax");
7
7
  const _abap_object_1 = require("../objects/_abap_object");
8
8
  const dump_scope_1 = require("./dump_scope");
9
9
  const virtual_position_1 = require("../virtual_position");
10
+ const objects_1 = require("../objects");
10
11
  class Help {
11
12
  static find(reg, textDocument, position) {
12
- const file = _lsp_utils_1.LSPUtils.getABAPFile(reg, textDocument.uri);
13
+ const abapFile = _lsp_utils_1.LSPUtils.getABAPFile(reg, textDocument.uri);
14
+ if (abapFile !== undefined) {
15
+ return this.dumpABAP(abapFile, reg, textDocument, position);
16
+ }
17
+ const file = reg.getFileByName(textDocument.uri);
13
18
  if (file === undefined) {
14
- return "file not found";
19
+ return "File not found: " + textDocument.uri;
15
20
  }
16
- else {
17
- return this.dumpABAP(file, reg, textDocument, position);
21
+ const obj = reg.findObjectForFile(file);
22
+ if (obj instanceof objects_1.DataDefinition) {
23
+ return "Data definition, dump todo";
18
24
  }
25
+ return "Unhandled object type: " + obj.getType();
19
26
  }
20
27
  /////////////////////////////////////////////////
21
28
  static dumpABAP(file, reg, textDocument, position) {
@@ -67,7 +67,7 @@ class Registry {
67
67
  }
68
68
  static abaplintVersion() {
69
69
  // magic, see build script "version.sh"
70
- return "2.113.89";
70
+ return "2.113.91";
71
71
  }
72
72
  getDDICReferences() {
73
73
  return this.ddicReferences;
@@ -30,7 +30,7 @@ class LocalTestclassConsistency extends _abap_rule_1.ABAPRule {
30
30
  this.conf = conf;
31
31
  }
32
32
  runParsed(file, obj) {
33
- var _a;
33
+ var _a, _b, _c;
34
34
  const issues = [];
35
35
  if (this.reg.getConfig().getVersion() === version_1.Version.v700) {
36
36
  // 700 does not have testclass includes
@@ -56,6 +56,16 @@ class LocalTestclassConsistency extends _abap_rule_1.ABAPRule {
56
56
  issues.push(issue);
57
57
  }
58
58
  }
59
+ if (file.getFilename() === ((_b = obj.getMainABAPFile()) === null || _b === void 0 ? void 0 : _b.getFilename())
60
+ && obj.getTestclassFile() === undefined
61
+ && ((_c = obj.getXML()) === null || _c === void 0 ? void 0 : _c.includes("<WITH_UNIT_TESTS>X</WITH_UNIT_TESTS>")) === true) {
62
+ const id = obj.getIdentifier();
63
+ if (id) {
64
+ const message = "Has <WITH_UNIT_TESTS> set in XML, but no testclasses";
65
+ const issue = issue_1.Issue.atIdentifier(id, message, this.getMetadata().key, this.conf.severity);
66
+ issues.push(issue);
67
+ }
68
+ }
59
69
  return issues;
60
70
  }
61
71
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.113.89",
3
+ "version": "2.113.91",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",
@@ -53,7 +53,7 @@
53
53
  "@microsoft/api-extractor": "^7.49.1",
54
54
  "@types/chai": "^4.3.20",
55
55
  "@types/mocha": "^10.0.10",
56
- "@types/node": "^22.10.5",
56
+ "@types/node": "^22.10.7",
57
57
  "chai": "^4.5.0",
58
58
  "eslint": "^9.18.0",
59
59
  "mocha": "^11.0.1",