@abaplint/transpiler-cli 2.14.10 → 2.14.11
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/build/bundle.js +1789 -254
- package/package.json +3 -3
package/build/bundle.js
CHANGED
|
@@ -1619,11 +1619,40 @@ exports.LexerStream = LexerStream;
|
|
|
1619
1619
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1620
1620
|
exports.AbstractToken = void 0;
|
|
1621
1621
|
const position_1 = __webpack_require__(/*! ../../../position */ "./node_modules/@abaplint/core/build/src/position.js");
|
|
1622
|
-
|
|
1622
|
+
const virtual_position_1 = __webpack_require__(/*! ../../../virtual_position */ "./node_modules/@abaplint/core/build/src/virtual_position.js");
|
|
1623
|
+
// token strings repeat a lot across files (keywords, common names, upper cased copies), share them.
|
|
1624
|
+
// Longer strings are typically comments or text literals, not worth sharing
|
|
1625
|
+
const INTERN_MAX_LENGTH = 30;
|
|
1626
|
+
// bound the table, it lives for the lifetime of the process
|
|
1627
|
+
const INTERN_MAX_ENTRIES = 100000;
|
|
1628
|
+
// V8 represents substrings of this length or longer as slices that reference the full source,
|
|
1629
|
+
// these are flattened before being stored, so the table does not keep removed files alive
|
|
1630
|
+
const SLICED_MIN_LENGTH = 13;
|
|
1631
|
+
let interned = new Map();
|
|
1632
|
+
function intern(str) {
|
|
1633
|
+
if (str.length > INTERN_MAX_LENGTH) {
|
|
1634
|
+
return str;
|
|
1635
|
+
}
|
|
1636
|
+
const found = interned.get(str);
|
|
1637
|
+
if (found !== undefined) {
|
|
1638
|
+
return found;
|
|
1639
|
+
}
|
|
1640
|
+
if (interned.size >= INTERN_MAX_ENTRIES) {
|
|
1641
|
+
interned = new Map();
|
|
1642
|
+
}
|
|
1643
|
+
const copy = str.length >= SLICED_MIN_LENGTH ? str.split("").join("") : str;
|
|
1644
|
+
interned.set(copy, copy);
|
|
1645
|
+
return copy;
|
|
1646
|
+
}
|
|
1647
|
+
// the token is its own start position, saves a separate Position object per token
|
|
1648
|
+
class AbstractToken extends position_1.Position {
|
|
1623
1649
|
constructor(start, str) {
|
|
1624
|
-
|
|
1625
|
-
this.str = str;
|
|
1626
|
-
this.strUpper = str.toUpperCase();
|
|
1650
|
+
super(start.getRow(), start.getCol());
|
|
1651
|
+
this.str = intern(str);
|
|
1652
|
+
this.strUpper = intern(str.toUpperCase());
|
|
1653
|
+
if (start instanceof virtual_position_1.VirtualPosition) {
|
|
1654
|
+
this.virtual = start;
|
|
1655
|
+
}
|
|
1627
1656
|
}
|
|
1628
1657
|
// special function, for debugging purposes, see https://github.com/abaplint/abaplint/pull/3137
|
|
1629
1658
|
[Symbol.for("debug.description")]() {
|
|
@@ -1635,17 +1664,12 @@ class AbstractToken {
|
|
|
1635
1664
|
getUpperStr() {
|
|
1636
1665
|
return this.strUpper;
|
|
1637
1666
|
}
|
|
1638
|
-
getRow() {
|
|
1639
|
-
return this.start.getRow();
|
|
1640
|
-
}
|
|
1641
|
-
getCol() {
|
|
1642
|
-
return this.start.getCol();
|
|
1643
|
-
}
|
|
1644
1667
|
getStart() {
|
|
1645
|
-
|
|
1668
|
+
var _a;
|
|
1669
|
+
return (_a = this.virtual) !== null && _a !== void 0 ? _a : this;
|
|
1646
1670
|
}
|
|
1647
1671
|
getEnd() {
|
|
1648
|
-
return new position_1.Position(this.
|
|
1672
|
+
return new position_1.Position(this.getRow(), this.getCol() + this.str.length);
|
|
1649
1673
|
}
|
|
1650
1674
|
}
|
|
1651
1675
|
exports.AbstractToken = AbstractToken;
|
|
@@ -12333,23 +12357,25 @@ class Result {
|
|
|
12333
12357
|
return this.tokens[this.tokenIndex + offset];
|
|
12334
12358
|
}
|
|
12335
12359
|
shift(node) {
|
|
12336
|
-
return Result.fromChain(this.tokens, this.tokenIndex + 1, { node, previous: this.nodes }, this.nodeCount + 1);
|
|
12360
|
+
return Result.fromChain(this.tokens, this.tokenIndex + 1, { node, tokenCount: 1, previous: this.nodes }, this.nodeCount + 1);
|
|
12337
12361
|
}
|
|
12338
12362
|
wrapConsumed(consumedTokens, node) {
|
|
12339
12363
|
let current = this.nodes;
|
|
12340
12364
|
let currentCount = this.nodeCount;
|
|
12365
|
+
let tokenCount = 0;
|
|
12341
12366
|
const children = [];
|
|
12342
12367
|
while (consumedTokens > 0) {
|
|
12343
12368
|
if (current === undefined) {
|
|
12344
12369
|
break;
|
|
12345
12370
|
}
|
|
12346
12371
|
children.push(current.node);
|
|
12347
|
-
consumedTokens = consumedTokens - current.
|
|
12372
|
+
consumedTokens = consumedTokens - current.tokenCount;
|
|
12373
|
+
tokenCount = tokenCount + current.tokenCount;
|
|
12348
12374
|
current = current.previous;
|
|
12349
12375
|
currentCount--;
|
|
12350
12376
|
}
|
|
12351
12377
|
node.setChildren(children.reverse());
|
|
12352
|
-
this.nodes = { node, previous: current };
|
|
12378
|
+
this.nodes = { node, tokenCount, previous: current };
|
|
12353
12379
|
this.nodeCount = currentCount + 1;
|
|
12354
12380
|
return this;
|
|
12355
12381
|
}
|
|
@@ -12378,7 +12404,7 @@ class Result {
|
|
|
12378
12404
|
this.nodes = undefined;
|
|
12379
12405
|
this.nodeCount = 0;
|
|
12380
12406
|
for (const node of n) {
|
|
12381
|
-
this.nodes = { node, previous: this.nodes };
|
|
12407
|
+
this.nodes = { node, tokenCount: node.countTokens(), previous: this.nodes };
|
|
12382
12408
|
this.nodeCount++;
|
|
12383
12409
|
}
|
|
12384
12410
|
}
|
|
@@ -20468,11 +20494,15 @@ class Submit {
|
|
|
20468
20494
|
const datasetExpiration = (0, combi_1.seq)("DATASET EXPIRATION", expressions_1.Source);
|
|
20469
20495
|
const coverText = (0, combi_1.seq)("COVER TEXT", expressions_1.Source);
|
|
20470
20496
|
const listName = (0, combi_1.seq)("LIST NAME", expressions_1.Source);
|
|
20497
|
+
const listDataset = (0, combi_1.seq)("LIST DATASET", expressions_1.Source);
|
|
20498
|
+
const listAuthority = (0, combi_1.seq)("LIST AUTHORITY", expressions_1.Source);
|
|
20499
|
+
const coverPage = (0, combi_1.seq)("COVER PAGE", expressions_1.Source);
|
|
20500
|
+
const department = (0, combi_1.seq)("DEPARTMENT", expressions_1.Source);
|
|
20471
20501
|
const keep = (0, combi_1.seq)("KEEP IN SPOOL", expressions_1.Source);
|
|
20472
20502
|
const imm = (0, combi_1.seq)("IMMEDIATELY", expressions_1.Source);
|
|
20473
20503
|
const dest = (0, combi_1.seq)("DESTINATION", expressions_1.Source);
|
|
20474
20504
|
const language = (0, combi_1.seq)("LANGUAGE", expressions_1.Source);
|
|
20475
|
-
const perm = (0, combi_1.per)((0, combi_1.plusPrio)(awith), selectionTable, (0, combi_1.plusPrio)(awith), (0, combi_1.plusPrio)(awith), spool, lineSize, lineCount, archive, archiveMode, receiver, user, sset, ssetp, keep, cover, imm, layout, dest, coverText, listName, language, free, newList, uss, copies, datasetExpiration, "TO SAP-SPOOL", "WITHOUT SPOOL DYNPRO", "VIA SELECTION-SCREEN", exporting, expressions_1.AndReturn, job);
|
|
20505
|
+
const perm = (0, combi_1.per)((0, combi_1.plusPrio)(awith), selectionTable, (0, combi_1.plusPrio)(awith), (0, combi_1.plusPrio)(awith), spool, lineSize, lineCount, archive, archiveMode, receiver, user, sset, ssetp, keep, cover, imm, layout, dest, coverText, listName, listDataset, listAuthority, coverPage, department, language, free, newList, uss, copies, datasetExpiration, "TO SAP-SPOOL", "WITHOUT SPOOL DYNPRO", "VIA SELECTION-SCREEN", exporting, expressions_1.AndReturn, job);
|
|
20476
20506
|
const ret = (0, combi_1.seq)("SUBMIT", prog, (0, combi_1.opt)(perm));
|
|
20477
20507
|
return (0, combi_1.verNotLang)(version_1.LanguageVersion.Cloud, ret);
|
|
20478
20508
|
}
|
|
@@ -27265,7 +27295,7 @@ class CurrentScope {
|
|
|
27265
27295
|
else if (this.isOO() && this.current.getData().vars[upper] !== undefined) {
|
|
27266
27296
|
throw new Error(`"${name}" already defined`);
|
|
27267
27297
|
}
|
|
27268
|
-
this.current.
|
|
27298
|
+
this.current.setType(upper, type);
|
|
27269
27299
|
}
|
|
27270
27300
|
addExtraLikeType(type) {
|
|
27271
27301
|
if (type === undefined) {
|
|
@@ -27284,7 +27314,7 @@ class CurrentScope {
|
|
|
27284
27314
|
if (this.current.getData().extraLikeTypes[upper] !== undefined) {
|
|
27285
27315
|
throw new Error(`Type name "${name}" already defined`);
|
|
27286
27316
|
}
|
|
27287
|
-
this.current.
|
|
27317
|
+
this.current.setExtraLikeType(upper, type);
|
|
27288
27318
|
}
|
|
27289
27319
|
addClassDefinition(c) {
|
|
27290
27320
|
if (this.current === undefined) {
|
|
@@ -27294,13 +27324,13 @@ class CurrentScope {
|
|
|
27294
27324
|
if (this.current.getData().cdefs[name] !== undefined) {
|
|
27295
27325
|
throw new Error(`Class "${name}" already defined`);
|
|
27296
27326
|
}
|
|
27297
|
-
this.current.
|
|
27327
|
+
this.current.setClassDefinition(name, c);
|
|
27298
27328
|
}
|
|
27299
27329
|
addFormDefinitions(f) {
|
|
27300
27330
|
if (this.current === undefined) {
|
|
27301
27331
|
return;
|
|
27302
27332
|
}
|
|
27303
|
-
this.current.
|
|
27333
|
+
this.current.addFormDefinitions(f);
|
|
27304
27334
|
}
|
|
27305
27335
|
/** The FORM definitions are built up front, at that point the program level types are not known.
|
|
27306
27336
|
* When the FORM statement is traversed it is replaced with one resolved in the scope of the FORM */
|
|
@@ -27325,7 +27355,7 @@ class CurrentScope {
|
|
|
27325
27355
|
if (this.current.getData().cdefs[name] !== undefined) {
|
|
27326
27356
|
throw new Error(`Interface "${name}" already defined`);
|
|
27327
27357
|
}
|
|
27328
|
-
this.current.
|
|
27358
|
+
this.current.setInterfaceDefinition(name, i);
|
|
27329
27359
|
}
|
|
27330
27360
|
addNamedIdentifier(name, identifier) {
|
|
27331
27361
|
if (this.current === undefined) {
|
|
@@ -27339,7 +27369,7 @@ class CurrentScope {
|
|
|
27339
27369
|
else if (this.isOO() && this.current.getData().types[upper] !== undefined) {
|
|
27340
27370
|
throw new Error(`"${name}" already defined`);
|
|
27341
27371
|
}
|
|
27342
|
-
this.current.
|
|
27372
|
+
this.current.setVariable(upper, identifier);
|
|
27343
27373
|
}
|
|
27344
27374
|
addNamedIdentifierToParent(name, identifier) {
|
|
27345
27375
|
if (this.current === undefined) {
|
|
@@ -27357,7 +27387,7 @@ class CurrentScope {
|
|
|
27357
27387
|
else if (this.isOO() && parent.getData().types[upper] !== undefined) {
|
|
27358
27388
|
throw new Error(`"${name}" already defined`);
|
|
27359
27389
|
}
|
|
27360
|
-
parent.
|
|
27390
|
+
parent.setVariable(upper, identifier);
|
|
27361
27391
|
}
|
|
27362
27392
|
addIdentifier(identifier) {
|
|
27363
27393
|
if (identifier === undefined) {
|
|
@@ -27369,7 +27399,7 @@ class CurrentScope {
|
|
|
27369
27399
|
if (token === undefined) {
|
|
27370
27400
|
return;
|
|
27371
27401
|
}
|
|
27372
|
-
this.current.
|
|
27402
|
+
this.current.setDeferred(token.getStr().toUpperCase(), { token, ooType: type });
|
|
27373
27403
|
}
|
|
27374
27404
|
addListPrefix(identifiers, prefix) {
|
|
27375
27405
|
for (const id of identifiers) {
|
|
@@ -27389,16 +27419,16 @@ class CurrentScope {
|
|
|
27389
27419
|
const position = new _identifier_1.Identifier(usage, filename);
|
|
27390
27420
|
if (Array.isArray(type)) {
|
|
27391
27421
|
for (const t of type) {
|
|
27392
|
-
(_a = this.current) === null || _a === void 0 ? void 0 : _a.
|
|
27422
|
+
(_a = this.current) === null || _a === void 0 ? void 0 : _a.addReference({ position, resolved: referencing, referenceType: t, extra });
|
|
27393
27423
|
}
|
|
27394
27424
|
}
|
|
27395
27425
|
else {
|
|
27396
|
-
(_b = this.current) === null || _b === void 0 ? void 0 : _b.
|
|
27426
|
+
(_b = this.current) === null || _b === void 0 ? void 0 : _b.addReference({ position, resolved: referencing, referenceType: type, extra });
|
|
27397
27427
|
}
|
|
27398
27428
|
}
|
|
27399
27429
|
addSQLConversion(fieldName, message, token) {
|
|
27400
27430
|
var _a;
|
|
27401
|
-
(_a = this.current) === null || _a === void 0 ? void 0 : _a.
|
|
27431
|
+
(_a = this.current) === null || _a === void 0 ? void 0 : _a.addSQLConversion({ fieldName, message, token });
|
|
27402
27432
|
}
|
|
27403
27433
|
///////////////////////////
|
|
27404
27434
|
findFunctionModule(name) {
|
|
@@ -27434,6 +27464,9 @@ class CurrentScope {
|
|
|
27434
27464
|
return undefined;
|
|
27435
27465
|
}
|
|
27436
27466
|
const name = (_a = this.parentObj.getClassDefinition()) === null || _a === void 0 ? void 0 : _a.behaviorDefinitionName;
|
|
27467
|
+
return this.findBehaviorDefinitionByName(name);
|
|
27468
|
+
}
|
|
27469
|
+
findBehaviorDefinitionByName(name) {
|
|
27437
27470
|
if (name === undefined) {
|
|
27438
27471
|
return undefined;
|
|
27439
27472
|
}
|
|
@@ -27763,6 +27796,84 @@ exports.CurrentScope = CurrentScope;
|
|
|
27763
27796
|
|
|
27764
27797
|
/***/ },
|
|
27765
27798
|
|
|
27799
|
+
/***/ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_eml.js"
|
|
27800
|
+
/*!*********************************************************************!*\
|
|
27801
|
+
!*** ./node_modules/@abaplint/core/build/src/abap/5_syntax/_eml.js ***!
|
|
27802
|
+
\*********************************************************************/
|
|
27803
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
27804
|
+
|
|
27805
|
+
"use strict";
|
|
27806
|
+
|
|
27807
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
27808
|
+
if (k2 === undefined) k2 = k;
|
|
27809
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
27810
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
27811
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
27812
|
+
}
|
|
27813
|
+
Object.defineProperty(o, k2, desc);
|
|
27814
|
+
}) : (function(o, m, k, k2) {
|
|
27815
|
+
if (k2 === undefined) k2 = k;
|
|
27816
|
+
o[k2] = m[k];
|
|
27817
|
+
}));
|
|
27818
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
27819
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
27820
|
+
}) : function(o, v) {
|
|
27821
|
+
o["default"] = v;
|
|
27822
|
+
});
|
|
27823
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
27824
|
+
var ownKeys = function(o) {
|
|
27825
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
27826
|
+
var ar = [];
|
|
27827
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
27828
|
+
return ar;
|
|
27829
|
+
};
|
|
27830
|
+
return ownKeys(o);
|
|
27831
|
+
};
|
|
27832
|
+
return function (mod) {
|
|
27833
|
+
if (mod && mod.__esModule) return mod;
|
|
27834
|
+
var result = {};
|
|
27835
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
27836
|
+
__setModuleDefault(result, mod);
|
|
27837
|
+
return result;
|
|
27838
|
+
};
|
|
27839
|
+
})();
|
|
27840
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
27841
|
+
exports.EML = void 0;
|
|
27842
|
+
const Expressions = __importStar(__webpack_require__(/*! ../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js"));
|
|
27843
|
+
const _syntax_input_1 = __webpack_require__(/*! ./_syntax_input */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_syntax_input.js");
|
|
27844
|
+
/** checks the entities referenced in EML statements, eg. READ ENTITIES and MODIFY ENTITIES */
|
|
27845
|
+
class EML {
|
|
27846
|
+
static checkEntities(node, input) {
|
|
27847
|
+
var _a;
|
|
27848
|
+
var _b;
|
|
27849
|
+
const nameNode = node.findDirectExpression(Expressions.NamespaceSimpleName);
|
|
27850
|
+
if (nameNode === undefined) {
|
|
27851
|
+
// eg. dynamic "MODIFY ENTITIES OPERATIONS" or "ENTITY zentity\_association"
|
|
27852
|
+
return;
|
|
27853
|
+
}
|
|
27854
|
+
const name = nameNode.concatTokens();
|
|
27855
|
+
const scope = input.scope;
|
|
27856
|
+
if (node.findDirectTokenByText("ENTITIES") !== undefined) {
|
|
27857
|
+
// "ENTITIES OF" refers to the behavior definition
|
|
27858
|
+
if (scope.findBehaviorDefinitionByName(name) === undefined && scope.getDDIC().inErrorNamespace(name)) {
|
|
27859
|
+
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, nameNode.getFirstToken(), `Behavior definition "${name}" not found`));
|
|
27860
|
+
}
|
|
27861
|
+
return;
|
|
27862
|
+
}
|
|
27863
|
+
// single "ENTITY", inside a behavior pool the alias defined in the BDEF can be used
|
|
27864
|
+
const entity = (_b = (_a = scope.findBehaviorDefinition()) === null || _a === void 0 ? void 0 : _a.findEntityNameByAlias(name)) !== null && _b !== void 0 ? _b : name;
|
|
27865
|
+
if (scope.getDDIC().inErrorNamespace(entity)
|
|
27866
|
+
&& scope.findBehaviorDefinitionByName(entity) === undefined
|
|
27867
|
+
&& scope.getDDIC().lookupDDLS(entity) === undefined) {
|
|
27868
|
+
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, nameNode.getFirstToken(), `Entity "${name}" not found`));
|
|
27869
|
+
}
|
|
27870
|
+
}
|
|
27871
|
+
}
|
|
27872
|
+
exports.EML = EML;
|
|
27873
|
+
//# sourceMappingURL=_eml.js.map
|
|
27874
|
+
|
|
27875
|
+
/***/ },
|
|
27876
|
+
|
|
27766
27877
|
/***/ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_loop_table_change.js"
|
|
27767
27878
|
/*!***********************************************************************************!*\
|
|
27768
27879
|
!*** ./node_modules/@abaplint/core/build/src/abap/5_syntax/_loop_table_change.js ***!
|
|
@@ -28133,6 +28244,16 @@ class ObjectOriented {
|
|
|
28133
28244
|
}
|
|
28134
28245
|
return `The special method "${name}" cannot be called directly`;
|
|
28135
28246
|
}
|
|
28247
|
+
// classic exceptions cannot be raised in a method declaring class based exceptions, returns the message otherwise
|
|
28248
|
+
checkClassicException() {
|
|
28249
|
+
var _a;
|
|
28250
|
+
const methodName = this.scope.getEnclosingMethodName();
|
|
28251
|
+
const classDef = this.scope.findClassDefinition(this.scope.getEnclosingClassName());
|
|
28252
|
+
if (methodName && classDef && ((_a = this.searchMethodName(classDef, methodName).method) === null || _a === void 0 ? void 0 : _a.getRaising().length)) {
|
|
28253
|
+
return "Classic exceptions cannot be raised in methods with class based exceptions";
|
|
28254
|
+
}
|
|
28255
|
+
return undefined;
|
|
28256
|
+
}
|
|
28136
28257
|
// SUPER-> can only call the previous implementation of the method it is used in, returns the message otherwise
|
|
28137
28258
|
// both names are resolved in the super class, so an alias and the method it stands for are the same
|
|
28138
28259
|
checkSuperCall(superDef, methodName) {
|
|
@@ -30752,6 +30873,10 @@ class BasicTypes {
|
|
|
30752
30873
|
this.input.issues.push((0, _syntax_input_1.syntaxIssue)(this.input, chain.getFirstToken(), message));
|
|
30753
30874
|
return undefined;
|
|
30754
30875
|
}
|
|
30876
|
+
else if (concat === "SY-REPID" || concat === "SYST-REPID") {
|
|
30877
|
+
// predefined constant in every program, not a SYST component
|
|
30878
|
+
return undefined;
|
|
30879
|
+
}
|
|
30755
30880
|
return this.resolveConstantValue(chain);
|
|
30756
30881
|
}
|
|
30757
30882
|
throw new Error("findValue, unexpected");
|
|
@@ -38742,23 +38867,81 @@ const _typed_identifier_1 = __webpack_require__(/*! ../types/_typed_identifier *
|
|
|
38742
38867
|
const _identifier_1 = __webpack_require__(/*! ../4_file_information/_identifier */ "./node_modules/@abaplint/core/build/src/abap/4_file_information/_identifier.js");
|
|
38743
38868
|
const _reference_1 = __webpack_require__(/*! ./_reference */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js");
|
|
38744
38869
|
const assert_error_1 = __webpack_require__(/*! ./assert_error */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/assert_error.js");
|
|
38870
|
+
// most scopes only use a few of the containers, empty ones are shared and replaced on first write
|
|
38871
|
+
const EMPTY_OBJECT = Object.freeze({});
|
|
38872
|
+
const EMPTY_ARRAY = Object.freeze([]);
|
|
38745
38873
|
class ScopeData {
|
|
38746
38874
|
constructor() {
|
|
38747
38875
|
this.data = {
|
|
38748
|
-
vars:
|
|
38749
|
-
cdefs:
|
|
38750
|
-
idefs:
|
|
38751
|
-
forms:
|
|
38752
|
-
types:
|
|
38753
|
-
extraLikeTypes:
|
|
38754
|
-
deferred:
|
|
38755
|
-
references:
|
|
38756
|
-
sqlConversion:
|
|
38876
|
+
vars: EMPTY_OBJECT,
|
|
38877
|
+
cdefs: EMPTY_OBJECT,
|
|
38878
|
+
idefs: EMPTY_OBJECT,
|
|
38879
|
+
forms: EMPTY_ARRAY, // todo, refactor to object
|
|
38880
|
+
types: EMPTY_OBJECT,
|
|
38881
|
+
extraLikeTypes: EMPTY_OBJECT,
|
|
38882
|
+
deferred: EMPTY_OBJECT,
|
|
38883
|
+
references: EMPTY_ARRAY,
|
|
38884
|
+
sqlConversion: EMPTY_ARRAY,
|
|
38757
38885
|
};
|
|
38758
38886
|
}
|
|
38759
38887
|
getData() {
|
|
38760
38888
|
return this.data;
|
|
38761
38889
|
}
|
|
38890
|
+
// the shared empty containers are frozen, the methods below replace them on first write
|
|
38891
|
+
setVariable(name, identifier) {
|
|
38892
|
+
if (this.data.vars === EMPTY_OBJECT) {
|
|
38893
|
+
this.data.vars = {};
|
|
38894
|
+
}
|
|
38895
|
+
this.data.vars[name] = identifier;
|
|
38896
|
+
}
|
|
38897
|
+
setType(name, type) {
|
|
38898
|
+
if (this.data.types === EMPTY_OBJECT) {
|
|
38899
|
+
this.data.types = {};
|
|
38900
|
+
}
|
|
38901
|
+
this.data.types[name] = type;
|
|
38902
|
+
}
|
|
38903
|
+
setExtraLikeType(name, type) {
|
|
38904
|
+
if (this.data.extraLikeTypes === EMPTY_OBJECT) {
|
|
38905
|
+
this.data.extraLikeTypes = {};
|
|
38906
|
+
}
|
|
38907
|
+
this.data.extraLikeTypes[name] = type;
|
|
38908
|
+
}
|
|
38909
|
+
setDeferred(name, deferred) {
|
|
38910
|
+
if (this.data.deferred === EMPTY_OBJECT) {
|
|
38911
|
+
this.data.deferred = {};
|
|
38912
|
+
}
|
|
38913
|
+
this.data.deferred[name] = deferred;
|
|
38914
|
+
}
|
|
38915
|
+
setClassDefinition(name, cdef) {
|
|
38916
|
+
if (this.data.cdefs === EMPTY_OBJECT) {
|
|
38917
|
+
this.data.cdefs = {};
|
|
38918
|
+
}
|
|
38919
|
+
this.data.cdefs[name] = cdef;
|
|
38920
|
+
}
|
|
38921
|
+
setInterfaceDefinition(name, idef) {
|
|
38922
|
+
if (this.data.idefs === EMPTY_OBJECT) {
|
|
38923
|
+
this.data.idefs = {};
|
|
38924
|
+
}
|
|
38925
|
+
this.data.idefs[name] = idef;
|
|
38926
|
+
}
|
|
38927
|
+
addFormDefinitions(forms) {
|
|
38928
|
+
if (this.data.forms === EMPTY_ARRAY) {
|
|
38929
|
+
this.data.forms = [];
|
|
38930
|
+
}
|
|
38931
|
+
this.data.forms.push(...forms);
|
|
38932
|
+
}
|
|
38933
|
+
addReference(reference) {
|
|
38934
|
+
if (this.data.references === EMPTY_ARRAY) {
|
|
38935
|
+
this.data.references = [];
|
|
38936
|
+
}
|
|
38937
|
+
this.data.references.push(reference);
|
|
38938
|
+
}
|
|
38939
|
+
addSQLConversion(conversion) {
|
|
38940
|
+
if (this.data.sqlConversion === EMPTY_ARRAY) {
|
|
38941
|
+
this.data.sqlConversion = [];
|
|
38942
|
+
}
|
|
38943
|
+
this.data.sqlConversion.push(conversion);
|
|
38944
|
+
}
|
|
38762
38945
|
}
|
|
38763
38946
|
class SpaghettiScopeNode extends ScopeData {
|
|
38764
38947
|
[Symbol.for("debug.description")]() {
|
|
@@ -44963,8 +45146,16 @@ const basic_1 = __webpack_require__(/*! ../../types/basic */ "./node_modules/@ab
|
|
|
44963
45146
|
const source_1 = __webpack_require__(/*! ../expressions/source */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/source.js");
|
|
44964
45147
|
const target_1 = __webpack_require__(/*! ../expressions/target */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/target.js");
|
|
44965
45148
|
const message_source_1 = __webpack_require__(/*! ../expressions/message_source */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/message_source.js");
|
|
45149
|
+
const _syntax_input_1 = __webpack_require__(/*! ../_syntax_input */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_syntax_input.js");
|
|
45150
|
+
const _object_oriented_1 = __webpack_require__(/*! ../_object_oriented */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_object_oriented.js");
|
|
44966
45151
|
class Message {
|
|
44967
45152
|
runSyntax(node, input) {
|
|
45153
|
+
const exceptionName = node.findDirectExpression(Expressions.ExceptionName);
|
|
45154
|
+
const classicMessage = exceptionName ? new _object_oriented_1.ObjectOriented(input.scope).checkClassicException() : undefined;
|
|
45155
|
+
if (exceptionName && classicMessage) {
|
|
45156
|
+
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, exceptionName.getFirstToken(), classicMessage));
|
|
45157
|
+
return;
|
|
45158
|
+
}
|
|
44968
45159
|
const found = node.findExpressionAfterToken("INTO");
|
|
44969
45160
|
const inline = found === null || found === void 0 ? void 0 : found.findDirectExpression(Expressions.InlineData);
|
|
44970
45161
|
if (inline) {
|
|
@@ -45230,8 +45421,10 @@ const source_1 = __webpack_require__(/*! ../expressions/source */ "./node_module
|
|
|
45230
45421
|
const target_1 = __webpack_require__(/*! ../expressions/target */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/target.js");
|
|
45231
45422
|
const inline_data_1 = __webpack_require__(/*! ../expressions/inline_data */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/inline_data.js");
|
|
45232
45423
|
const basic_1 = __webpack_require__(/*! ../../types/basic */ "./node_modules/@abaplint/core/build/src/abap/types/basic/index.js");
|
|
45424
|
+
const _eml_1 = __webpack_require__(/*! ../_eml */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_eml.js");
|
|
45233
45425
|
class ModifyEntities {
|
|
45234
45426
|
runSyntax(node, input) {
|
|
45427
|
+
_eml_1.EML.checkEntities(node, input);
|
|
45235
45428
|
for (const s of node.findDirectExpressions(Expressions.Source)) {
|
|
45236
45429
|
source_1.Source.runSyntax(s, input);
|
|
45237
45430
|
}
|
|
@@ -46207,6 +46400,12 @@ class Raise {
|
|
|
46207
46400
|
var _a, _b, _c, _d, _e, _f;
|
|
46208
46401
|
const helper = new _object_oriented_1.ObjectOriented(input.scope);
|
|
46209
46402
|
let method;
|
|
46403
|
+
const exceptionName = node.findDirectExpression(Expressions.ExceptionName);
|
|
46404
|
+
const classicMessage = exceptionName ? helper.checkClassicException() : undefined;
|
|
46405
|
+
if (exceptionName && classicMessage) {
|
|
46406
|
+
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, exceptionName.getFirstToken(), classicMessage));
|
|
46407
|
+
return;
|
|
46408
|
+
}
|
|
46210
46409
|
const classTok = (_a = node.findDirectExpression(Expressions.ClassName)) === null || _a === void 0 ? void 0 : _a.getFirstToken();
|
|
46211
46410
|
const className = classTok === null || classTok === void 0 ? void 0 : classTok.getStr();
|
|
46212
46411
|
if (classTok && className) {
|
|
@@ -46541,8 +46740,10 @@ const source_1 = __webpack_require__(/*! ../expressions/source */ "./node_module
|
|
|
46541
46740
|
const target_1 = __webpack_require__(/*! ../expressions/target */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/target.js");
|
|
46542
46741
|
const inline_data_1 = __webpack_require__(/*! ../expressions/inline_data */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/inline_data.js");
|
|
46543
46742
|
const basic_1 = __webpack_require__(/*! ../../types/basic */ "./node_modules/@abaplint/core/build/src/abap/types/basic/index.js");
|
|
46743
|
+
const _eml_1 = __webpack_require__(/*! ../_eml */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_eml.js");
|
|
46544
46744
|
class ReadEntities {
|
|
46545
46745
|
runSyntax(node, input) {
|
|
46746
|
+
_eml_1.EML.checkEntities(node, input);
|
|
46546
46747
|
for (const s of node.findDirectExpressions(Expressions.Source)) {
|
|
46547
46748
|
source_1.Source.runSyntax(s, input);
|
|
46548
46749
|
}
|
|
@@ -51695,7 +51896,6 @@ const _abstract_node_1 = __webpack_require__(/*! ./_abstract_node */ "./node_mod
|
|
|
51695
51896
|
class ExpressionNode extends _abstract_node_1.AbstractNode {
|
|
51696
51897
|
constructor(expression) {
|
|
51697
51898
|
super();
|
|
51698
|
-
this.tokenCount = 0;
|
|
51699
51899
|
this.expression = expression;
|
|
51700
51900
|
}
|
|
51701
51901
|
addChild(_n) {
|
|
@@ -51706,13 +51906,15 @@ class ExpressionNode extends _abstract_node_1.AbstractNode {
|
|
|
51706
51906
|
}
|
|
51707
51907
|
setChildren(children) {
|
|
51708
51908
|
super.setChildren(children);
|
|
51709
|
-
for (const child of this.getChildren()) {
|
|
51710
|
-
this.tokenCount = this.tokenCount + child.countTokens();
|
|
51711
|
-
}
|
|
51712
51909
|
return this;
|
|
51713
51910
|
}
|
|
51911
|
+
// not stored on the node, saves a field per ExpressionNode, the statement parser tracks counts itself
|
|
51714
51912
|
countTokens() {
|
|
51715
|
-
|
|
51913
|
+
let count = 0;
|
|
51914
|
+
for (const child of this.getChildren()) {
|
|
51915
|
+
count = count + child.countTokens();
|
|
51916
|
+
}
|
|
51917
|
+
return count;
|
|
51716
51918
|
}
|
|
51717
51919
|
getFirstToken() {
|
|
51718
51920
|
for (const child of this.getChildren()) {
|
|
@@ -56644,6 +56846,874 @@ exports.ArtifactsRules = ArtifactsRules;
|
|
|
56644
56846
|
|
|
56645
56847
|
/***/ },
|
|
56646
56848
|
|
|
56849
|
+
/***/ "./node_modules/@abaplint/core/build/src/bdef/bdef_parser.js"
|
|
56850
|
+
/*!*******************************************************************!*\
|
|
56851
|
+
!*** ./node_modules/@abaplint/core/build/src/bdef/bdef_parser.js ***!
|
|
56852
|
+
\*******************************************************************/
|
|
56853
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
56854
|
+
|
|
56855
|
+
"use strict";
|
|
56856
|
+
|
|
56857
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
56858
|
+
if (k2 === undefined) k2 = k;
|
|
56859
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
56860
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
56861
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
56862
|
+
}
|
|
56863
|
+
Object.defineProperty(o, k2, desc);
|
|
56864
|
+
}) : (function(o, m, k, k2) {
|
|
56865
|
+
if (k2 === undefined) k2 = k;
|
|
56866
|
+
o[k2] = m[k];
|
|
56867
|
+
}));
|
|
56868
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
56869
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
56870
|
+
}) : function(o, v) {
|
|
56871
|
+
o["default"] = v;
|
|
56872
|
+
});
|
|
56873
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
56874
|
+
var ownKeys = function(o) {
|
|
56875
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
56876
|
+
var ar = [];
|
|
56877
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
56878
|
+
return ar;
|
|
56879
|
+
};
|
|
56880
|
+
return ownKeys(o);
|
|
56881
|
+
};
|
|
56882
|
+
return function (mod) {
|
|
56883
|
+
if (mod && mod.__esModule) return mod;
|
|
56884
|
+
var result = {};
|
|
56885
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
56886
|
+
__setModuleDefault(result, mod);
|
|
56887
|
+
return result;
|
|
56888
|
+
};
|
|
56889
|
+
})();
|
|
56890
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
56891
|
+
exports.BDEFParser = void 0;
|
|
56892
|
+
const tokens_1 = __webpack_require__(/*! ../abap/1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
|
|
56893
|
+
const combi_1 = __webpack_require__(/*! ../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
56894
|
+
const nodes_1 = __webpack_require__(/*! ../abap/nodes */ "./node_modules/@abaplint/core/build/src/abap/nodes/index.js");
|
|
56895
|
+
const cds_lexer_1 = __webpack_require__(/*! ../cds/cds_lexer */ "./node_modules/@abaplint/core/build/src/cds/cds_lexer.js");
|
|
56896
|
+
const version_1 = __webpack_require__(/*! ../version */ "./node_modules/@abaplint/core/build/src/version.js");
|
|
56897
|
+
const Expressions = __importStar(__webpack_require__(/*! ./expressions */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js"));
|
|
56898
|
+
class BDEFParser {
|
|
56899
|
+
parse(file) {
|
|
56900
|
+
if (file === undefined) {
|
|
56901
|
+
return undefined;
|
|
56902
|
+
}
|
|
56903
|
+
// BDEF has the same comments, strings and delimiters as CDS
|
|
56904
|
+
const tokens = this.removePragmas(cds_lexer_1.CDSLexer.run(file).filter(t => !(t instanceof tokens_1.Comment)));
|
|
56905
|
+
const res = combi_1.Combi.run(new Expressions.BDEFDefinition(), tokens, version_1.defaultRelease);
|
|
56906
|
+
if (res === undefined || !(res[0] instanceof nodes_1.ExpressionNode)) {
|
|
56907
|
+
return undefined;
|
|
56908
|
+
}
|
|
56909
|
+
return res[0];
|
|
56910
|
+
}
|
|
56911
|
+
/** pragmas can occur in many places, eg. "##NOT_ASSIGNED_TO_DETACT" or "##UNMAPPED_FIELD[SingletonID]" */
|
|
56912
|
+
removePragmas(tokens) {
|
|
56913
|
+
var _a;
|
|
56914
|
+
const ret = [];
|
|
56915
|
+
for (let i = 0; i < tokens.length; i++) {
|
|
56916
|
+
if (tokens[i].getStr().startsWith("##") === false) {
|
|
56917
|
+
ret.push(tokens[i]);
|
|
56918
|
+
continue;
|
|
56919
|
+
}
|
|
56920
|
+
if (((_a = tokens[i + 1]) === null || _a === void 0 ? void 0 : _a.getStr()) === "[") {
|
|
56921
|
+
while (i < tokens.length - 1 && tokens[i].getStr() !== "]") {
|
|
56922
|
+
i++;
|
|
56923
|
+
}
|
|
56924
|
+
}
|
|
56925
|
+
}
|
|
56926
|
+
return ret;
|
|
56927
|
+
}
|
|
56928
|
+
}
|
|
56929
|
+
exports.BDEFParser = BDEFParser;
|
|
56930
|
+
//# sourceMappingURL=bdef_parser.js.map
|
|
56931
|
+
|
|
56932
|
+
/***/ },
|
|
56933
|
+
|
|
56934
|
+
/***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_action.js"
|
|
56935
|
+
/*!*******************************************************************************!*\
|
|
56936
|
+
!*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_action.js ***!
|
|
56937
|
+
\*******************************************************************************/
|
|
56938
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
56939
|
+
|
|
56940
|
+
"use strict";
|
|
56941
|
+
|
|
56942
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
56943
|
+
exports.BDEFAction = void 0;
|
|
56944
|
+
const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js");
|
|
56945
|
+
const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
56946
|
+
/** actions and functions, eg. "static factory action ( features : global ) copy parameter ZPARAM result [1] $self;" */
|
|
56947
|
+
class BDEFAction extends combi_1.Expression {
|
|
56948
|
+
getRunnable() {
|
|
56949
|
+
const modifier = (0, combi_1.altPrio)("INTERNAL", "STATIC", "FACTORY", "DEFAULT", "DRAFT", "REPEATABLE", "RECOMMENDATION", (0, combi_1.seq)("SAVE", (0, combi_1.optPrio)(_1.BDEFOptions)), (0, combi_1.seq)("KEY", _1.BDEFOptions));
|
|
56950
|
+
const tail = (0, combi_1.altPrio)((0, combi_1.seq)("EXTERNAL", _1.BDEFString), (0, combi_1.seq)("AS", _1.BDEFName), _1.BDEFParameter, _1.BDEFResult, _1.BDEFCardinality, "OPTIMIZED", "EXTENSIBLE", "WITH ADDITIONAL IMPLEMENTATION");
|
|
56951
|
+
return (0, combi_1.seq)((0, combi_1.starPrio)(modifier), (0, combi_1.altPrio)("ACTION", "FUNCTION"), (0, combi_1.optPrio)(_1.BDEFOptions), _1.BDEFName, (0, combi_1.starPrio)(tail), (0, combi_1.altPrio)(";", _1.BDEFDefaultFunction));
|
|
56952
|
+
}
|
|
56953
|
+
}
|
|
56954
|
+
exports.BDEFAction = BDEFAction;
|
|
56955
|
+
//# sourceMappingURL=bdef_action.js.map
|
|
56956
|
+
|
|
56957
|
+
/***/ },
|
|
56958
|
+
|
|
56959
|
+
/***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_alias.js"
|
|
56960
|
+
/*!******************************************************************************!*\
|
|
56961
|
+
!*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_alias.js ***!
|
|
56962
|
+
\******************************************************************************/
|
|
56963
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
56964
|
+
|
|
56965
|
+
"use strict";
|
|
56966
|
+
|
|
56967
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
56968
|
+
exports.BDEFAlias = void 0;
|
|
56969
|
+
const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js");
|
|
56970
|
+
const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
56971
|
+
class BDEFAlias extends combi_1.Expression {
|
|
56972
|
+
getRunnable() {
|
|
56973
|
+
return (0, combi_1.seq)("ALIAS", _1.BDEFName);
|
|
56974
|
+
}
|
|
56975
|
+
}
|
|
56976
|
+
exports.BDEFAlias = BDEFAlias;
|
|
56977
|
+
//# sourceMappingURL=bdef_alias.js.map
|
|
56978
|
+
|
|
56979
|
+
/***/ },
|
|
56980
|
+
|
|
56981
|
+
/***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_association.js"
|
|
56982
|
+
/*!************************************************************************************!*\
|
|
56983
|
+
!*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_association.js ***!
|
|
56984
|
+
\************************************************************************************/
|
|
56985
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
56986
|
+
|
|
56987
|
+
"use strict";
|
|
56988
|
+
|
|
56989
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
56990
|
+
exports.BDEFAssociation = void 0;
|
|
56991
|
+
const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js");
|
|
56992
|
+
const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
56993
|
+
/** eg. "association _Booking { create; with draft; }" */
|
|
56994
|
+
class BDEFAssociation extends combi_1.Expression {
|
|
56995
|
+
getRunnable() {
|
|
56996
|
+
// cross BO association, eg. "using /DMO/R_TRAVELTP_XBO \_Agency"
|
|
56997
|
+
const using = (0, combi_1.seq)("USING", _1.BDEFName, (0, combi_1.optPrio)((0, combi_1.regex)(/^\\\w+$/)));
|
|
56998
|
+
return (0, combi_1.seq)((0, combi_1.starPrio)((0, combi_1.altPrio)("INTERNAL", "UNMANAGED", "ANCESTOR")), "ASSOCIATION", (0, combi_1.optPrio)(_1.BDEFOptions), _1.BDEFName, (0, combi_1.optPrio)(using), (0, combi_1.optPrio)((0, combi_1.seq)("ABBREVIATION", _1.BDEFName)), (0, combi_1.optPrio)("WITH HIERARCHY"), (0, combi_1.altPrio)(";", _1.BDEFAssociationBody));
|
|
56999
|
+
}
|
|
57000
|
+
}
|
|
57001
|
+
exports.BDEFAssociation = BDEFAssociation;
|
|
57002
|
+
//# sourceMappingURL=bdef_association.js.map
|
|
57003
|
+
|
|
57004
|
+
/***/ },
|
|
57005
|
+
|
|
57006
|
+
/***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_association_body.js"
|
|
57007
|
+
/*!*****************************************************************************************!*\
|
|
57008
|
+
!*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_association_body.js ***!
|
|
57009
|
+
\*****************************************************************************************/
|
|
57010
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
57011
|
+
|
|
57012
|
+
"use strict";
|
|
57013
|
+
|
|
57014
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
57015
|
+
exports.BDEFAssociationBody = void 0;
|
|
57016
|
+
const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js");
|
|
57017
|
+
const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
57018
|
+
/** eg. "{ create ( features : instance ); with draft; link action linkManager; }" */
|
|
57019
|
+
class BDEFAssociationBody extends combi_1.Expression {
|
|
57020
|
+
getRunnable() {
|
|
57021
|
+
const create = (0, combi_1.seq)((0, combi_1.optPrio)("INTERNAL"), "CREATE", (0, combi_1.optPrio)(_1.BDEFOptions), (0, combi_1.altPrio)(";", _1.BDEFDefaultFunction));
|
|
57022
|
+
const withh = (0, combi_1.seq)("WITH", (0, combi_1.altPrio)("DRAFT", "DEPENDENT DRAFT", "CASCADING DELETE"), ";");
|
|
57023
|
+
const link = (0, combi_1.seq)((0, combi_1.altPrio)("LINK", "UNLINK"), "ACTION", _1.BDEFName, ";");
|
|
57024
|
+
const inverse = (0, combi_1.seq)("INVERSE FUNCTION", _1.BDEFName, ";");
|
|
57025
|
+
const item = (0, combi_1.altPrio)(create, withh, link, inverse, ";");
|
|
57026
|
+
return (0, combi_1.seq)("{", (0, combi_1.starPrio)(item), "}");
|
|
57027
|
+
}
|
|
57028
|
+
}
|
|
57029
|
+
exports.BDEFAssociationBody = BDEFAssociationBody;
|
|
57030
|
+
//# sourceMappingURL=bdef_association_body.js.map
|
|
57031
|
+
|
|
57032
|
+
/***/ },
|
|
57033
|
+
|
|
57034
|
+
/***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_authorization_context.js"
|
|
57035
|
+
/*!**********************************************************************************************!*\
|
|
57036
|
+
!*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_authorization_context.js ***!
|
|
57037
|
+
\**********************************************************************************************/
|
|
57038
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
57039
|
+
|
|
57040
|
+
"use strict";
|
|
57041
|
+
|
|
57042
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
57043
|
+
exports.BDEFAuthorizationContext = void 0;
|
|
57044
|
+
const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js");
|
|
57045
|
+
const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
57046
|
+
/** eg. "define own authorization context { 'S_TABU_NAM'; }" or "define own authorization context by privileged mode;" */
|
|
57047
|
+
class BDEFAuthorizationContext extends combi_1.Expression {
|
|
57048
|
+
getRunnable() {
|
|
57049
|
+
const item = (0, combi_1.seq)((0, combi_1.altPrio)(_1.BDEFString, _1.BDEFName), ";");
|
|
57050
|
+
const body = (0, combi_1.seq)("{", (0, combi_1.starPrio)(item), "}", (0, combi_1.optPrio)(";"));
|
|
57051
|
+
const privileged = (0, combi_1.seq)("BY PRIVILEGED MODE", (0, combi_1.optPrio)("AND"));
|
|
57052
|
+
return (0, combi_1.seq)("DEFINE", (0, combi_1.optPrio)("OWN"), "AUTHORIZATION CONTEXT", (0, combi_1.optPrio)((0, combi_1.altPrio)(privileged, _1.BDEFName)), (0, combi_1.optPrio)((0, combi_1.seq)("FOR DISABLE", _1.BDEFOptions)), (0, combi_1.altPrio)(";", body));
|
|
57053
|
+
}
|
|
57054
|
+
}
|
|
57055
|
+
exports.BDEFAuthorizationContext = BDEFAuthorizationContext;
|
|
57056
|
+
//# sourceMappingURL=bdef_authorization_context.js.map
|
|
57057
|
+
|
|
57058
|
+
/***/ },
|
|
57059
|
+
|
|
57060
|
+
/***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_cardinality.js"
|
|
57061
|
+
/*!************************************************************************************!*\
|
|
57062
|
+
!*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_cardinality.js ***!
|
|
57063
|
+
\************************************************************************************/
|
|
57064
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
57065
|
+
|
|
57066
|
+
"use strict";
|
|
57067
|
+
|
|
57068
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
57069
|
+
exports.BDEFCardinality = void 0;
|
|
57070
|
+
const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
57071
|
+
/** eg. "[1]" or "[0..*]" */
|
|
57072
|
+
class BDEFCardinality extends combi_1.Expression {
|
|
57073
|
+
getRunnable() {
|
|
57074
|
+
const integer = (0, combi_1.regex)(/^\d+$/);
|
|
57075
|
+
return (0, combi_1.seq)("[", integer, (0, combi_1.optPrio)((0, combi_1.seq)(".", ".", (0, combi_1.altPrio)(integer, "*"))), "]");
|
|
57076
|
+
}
|
|
57077
|
+
}
|
|
57078
|
+
exports.BDEFCardinality = BDEFCardinality;
|
|
57079
|
+
//# sourceMappingURL=bdef_cardinality.js.map
|
|
57080
|
+
|
|
57081
|
+
/***/ },
|
|
57082
|
+
|
|
57083
|
+
/***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_default_function.js"
|
|
57084
|
+
/*!*****************************************************************************************!*\
|
|
57085
|
+
!*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_default_function.js ***!
|
|
57086
|
+
\*****************************************************************************************/
|
|
57087
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
57088
|
+
|
|
57089
|
+
"use strict";
|
|
57090
|
+
|
|
57091
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
57092
|
+
exports.BDEFDefaultFunction = void 0;
|
|
57093
|
+
const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js");
|
|
57094
|
+
const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
57095
|
+
/** eg. "{ default function GetDefaultsForCreate; }" */
|
|
57096
|
+
class BDEFDefaultFunction extends combi_1.Expression {
|
|
57097
|
+
getRunnable() {
|
|
57098
|
+
const func = (0, combi_1.seq)("DEFAULT FUNCTION", (0, combi_1.optPrio)((0, combi_1.seq)(_1.BDEFName, (0, combi_1.optPrio)((0, combi_1.seq)("EXTERNAL", _1.BDEFString)))), ";");
|
|
57099
|
+
return (0, combi_1.seq)("{", (0, combi_1.plusPrio)(func), "}");
|
|
57100
|
+
}
|
|
57101
|
+
}
|
|
57102
|
+
exports.BDEFDefaultFunction = BDEFDefaultFunction;
|
|
57103
|
+
//# sourceMappingURL=bdef_default_function.js.map
|
|
57104
|
+
|
|
57105
|
+
/***/ },
|
|
57106
|
+
|
|
57107
|
+
/***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_define_behavior.js"
|
|
57108
|
+
/*!****************************************************************************************!*\
|
|
57109
|
+
!*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_define_behavior.js ***!
|
|
57110
|
+
\****************************************************************************************/
|
|
57111
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
57112
|
+
|
|
57113
|
+
"use strict";
|
|
57114
|
+
|
|
57115
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
57116
|
+
exports.BDEFDefineBehavior = void 0;
|
|
57117
|
+
const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js");
|
|
57118
|
+
const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
57119
|
+
/** behavior of one entity, "define behavior for ZI_Travel alias Travel ... { ... }" */
|
|
57120
|
+
class BDEFDefineBehavior extends combi_1.Expression {
|
|
57121
|
+
getRunnable() {
|
|
57122
|
+
const fieldMapping = (0, combi_1.seq)(_1.BDEFName, "=", _1.BDEFName);
|
|
57123
|
+
const lockMapping = (0, combi_1.seq)("(", fieldMapping, (0, combi_1.starPrio)((0, combi_1.seq)(",", fieldMapping)), ")");
|
|
57124
|
+
const dependentBy = (0, combi_1.seq)("DEPENDENT", (0, combi_1.optPrio)((0, combi_1.seq)("BY", _1.BDEFName)));
|
|
57125
|
+
const save = (0, combi_1.seq)((0, combi_1.altPrio)("WITH ADDITIONAL SAVE", "WITH UNMANAGED SAVE"), (0, combi_1.optPrio)("AND CLEANUP"), (0, combi_1.optPrio)("WITH FULL DATA"));
|
|
57126
|
+
const option = (0, combi_1.altPrio)(_1.BDEFAlias, _1.BDEFImplementationIn, (0, combi_1.seq)("EXTERNAL", _1.BDEFString), (0, combi_1.seq)("PERSISTENT TABLE", _1.BDEFName), (0, combi_1.seq)("DRAFT TABLE", _1.BDEFName), (0, combi_1.seq)("QUERY", _1.BDEFName), (0, combi_1.seq)("LOCK", (0, combi_1.altPrio)((0, combi_1.seq)("MASTER", (0, combi_1.optPrio)("UNMANAGED")), (0, combi_1.seq)(dependentBy, (0, combi_1.optPrio)(lockMapping)))), (0, combi_1.seq)("AUTHORIZATION", (0, combi_1.altPrio)((0, combi_1.seq)("MASTER", _1.BDEFOptions), dependentBy)), (0, combi_1.seq)((0, combi_1.optPrio)("TOTAL"), "ETAG", (0, combi_1.altPrio)((0, combi_1.seq)("MASTER", _1.BDEFName), dependentBy, _1.BDEFName)),
|
|
57127
|
+
// eg. "( lock, authorization, etag ) dependent by _Travel"
|
|
57128
|
+
(0, combi_1.seq)(_1.BDEFOptions, dependentBy), (0, combi_1.seq)((0, combi_1.altPrio)("LATE", "EARLY"), "NUMBERING", (0, combi_1.optPrio)("IN PLACE")), save, "WITH CONTROL", "USE ETAG", (0, combi_1.seq)("USING", _1.BDEFName), (0, combi_1.seq)("CHANGEDOCUMENTS", (0, combi_1.altPrio)((0, combi_1.seq)("MASTER", (0, combi_1.optPrio)("UTC"), (0, combi_1.optPrio)(_1.BDEFOptions)), dependentBy)), "EXTENSIBLE");
|
|
57129
|
+
const item = (0, combi_1.altPrio)(_1.BDEFUse, _1.BDEFDetermineAction, _1.BDEFOperation, _1.BDEFAction, _1.BDEFDetermination, _1.BDEFField, _1.BDEFAssociation, _1.BDEFMapping, _1.BDEFSideEffects, _1.BDEFEvent, _1.BDEFHierarchy, _1.BDEFKey, (0, combi_1.seq)("CHANGEDOCUMENTS", _1.BDEFOptions, ";"), ";");
|
|
57130
|
+
return (0, combi_1.seq)((0, combi_1.altPrio)((0, combi_1.seq)("DEFINE", (0, combi_1.optPrio)("ROOT"), "BEHAVIOR FOR"), "EXTEND BEHAVIOR FOR"), _1.BDEFName, (0, combi_1.starPrio)(option), "{", (0, combi_1.starPrio)(item), "}", (0, combi_1.optPrio)(";"));
|
|
57131
|
+
}
|
|
57132
|
+
}
|
|
57133
|
+
exports.BDEFDefineBehavior = BDEFDefineBehavior;
|
|
57134
|
+
//# sourceMappingURL=bdef_define_behavior.js.map
|
|
57135
|
+
|
|
57136
|
+
/***/ },
|
|
57137
|
+
|
|
57138
|
+
/***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_definition.js"
|
|
57139
|
+
/*!***********************************************************************************!*\
|
|
57140
|
+
!*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_definition.js ***!
|
|
57141
|
+
\***********************************************************************************/
|
|
57142
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
57143
|
+
|
|
57144
|
+
"use strict";
|
|
57145
|
+
|
|
57146
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
57147
|
+
exports.BDEFDefinition = void 0;
|
|
57148
|
+
const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js");
|
|
57149
|
+
const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
57150
|
+
class BDEFDefinition extends combi_1.Expression {
|
|
57151
|
+
getRunnable() {
|
|
57152
|
+
return (0, combi_1.seq)(_1.BDEFImplementationType, (0, combi_1.starPrio)((0, combi_1.altPrio)(_1.BDEFHeader, _1.BDEFDefineBehavior, _1.BDEFAuthorizationContext)));
|
|
57153
|
+
}
|
|
57154
|
+
}
|
|
57155
|
+
exports.BDEFDefinition = BDEFDefinition;
|
|
57156
|
+
//# sourceMappingURL=bdef_definition.js.map
|
|
57157
|
+
|
|
57158
|
+
/***/ },
|
|
57159
|
+
|
|
57160
|
+
/***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_determination.js"
|
|
57161
|
+
/*!**************************************************************************************!*\
|
|
57162
|
+
!*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_determination.js ***!
|
|
57163
|
+
\**************************************************************************************/
|
|
57164
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
57165
|
+
|
|
57166
|
+
"use strict";
|
|
57167
|
+
|
|
57168
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
57169
|
+
exports.BDEFDetermination = void 0;
|
|
57170
|
+
const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js");
|
|
57171
|
+
const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
57172
|
+
/** determinations and validations, eg. "validation validateDates on save { create; field BeginDate, EndDate; }" */
|
|
57173
|
+
class BDEFDetermination extends combi_1.Expression {
|
|
57174
|
+
getRunnable() {
|
|
57175
|
+
const fields = (0, combi_1.seq)(_1.BDEFFieldPath, (0, combi_1.starPrio)((0, combi_1.seq)(",", _1.BDEFFieldPath)));
|
|
57176
|
+
const trigger = (0, combi_1.altPrio)((0, combi_1.seq)((0, combi_1.altPrio)("CREATE", "UPDATE", "DELETE"), ";"), (0, combi_1.seq)("FIELD", fields, ";"), (0, combi_1.seq)("ENTITY", fields, ";"), ";");
|
|
57177
|
+
return (0, combi_1.seq)((0, combi_1.altPrio)("DETERMINATION", "VALIDATION"), (0, combi_1.optPrio)(_1.BDEFOptions), _1.BDEFName, "ON", (0, combi_1.altPrio)("MODIFY", "SAVE"), "{", (0, combi_1.starPrio)(trigger), "}");
|
|
57178
|
+
}
|
|
57179
|
+
}
|
|
57180
|
+
exports.BDEFDetermination = BDEFDetermination;
|
|
57181
|
+
//# sourceMappingURL=bdef_determination.js.map
|
|
57182
|
+
|
|
57183
|
+
/***/ },
|
|
57184
|
+
|
|
57185
|
+
/***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_determine_action.js"
|
|
57186
|
+
/*!*****************************************************************************************!*\
|
|
57187
|
+
!*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_determine_action.js ***!
|
|
57188
|
+
\*****************************************************************************************/
|
|
57189
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
57190
|
+
|
|
57191
|
+
"use strict";
|
|
57192
|
+
|
|
57193
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
57194
|
+
exports.BDEFDetermineAction = void 0;
|
|
57195
|
+
const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js");
|
|
57196
|
+
const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
57197
|
+
/** eg. "draft determine action Prepare { validation validateDate; determination ( always ) Child ~ setStatus; }" */
|
|
57198
|
+
class BDEFDetermineAction extends combi_1.Expression {
|
|
57199
|
+
getRunnable() {
|
|
57200
|
+
const item = (0, combi_1.seq)((0, combi_1.altPrio)("VALIDATION", "DETERMINATION"), (0, combi_1.optPrio)(_1.BDEFOptions), _1.BDEFReference, ";");
|
|
57201
|
+
const body = (0, combi_1.seq)("{", (0, combi_1.starPrio)(item), "}");
|
|
57202
|
+
return (0, combi_1.seq)((0, combi_1.optPrio)("EXTEND"), (0, combi_1.optPrio)("DRAFT"), "DETERMINE ACTION", (0, combi_1.optPrio)(_1.BDEFOptions), _1.BDEFName, (0, combi_1.optPrio)("EXTENSIBLE"), (0, combi_1.altPrio)(";", body));
|
|
57203
|
+
}
|
|
57204
|
+
}
|
|
57205
|
+
exports.BDEFDetermineAction = BDEFDetermineAction;
|
|
57206
|
+
//# sourceMappingURL=bdef_determine_action.js.map
|
|
57207
|
+
|
|
57208
|
+
/***/ },
|
|
57209
|
+
|
|
57210
|
+
/***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_event.js"
|
|
57211
|
+
/*!******************************************************************************!*\
|
|
57212
|
+
!*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_event.js ***!
|
|
57213
|
+
\******************************************************************************/
|
|
57214
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
57215
|
+
|
|
57216
|
+
"use strict";
|
|
57217
|
+
|
|
57218
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
57219
|
+
exports.BDEFEvent = void 0;
|
|
57220
|
+
const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js");
|
|
57221
|
+
const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
57222
|
+
/** eg. "event TravelCreated parameter ZD_TRAVEL_EVENT;" or "event StatusUpdated for side effects;" */
|
|
57223
|
+
class BDEFEvent extends combi_1.Expression {
|
|
57224
|
+
getRunnable() {
|
|
57225
|
+
const tail = (0, combi_1.altPrio)((0, combi_1.seq)("ON", _1.BDEFName), _1.BDEFParameter, "FOR SIDE EFFECTS", (0, combi_1.seq)("DESCRIPTION", _1.BDEFString), (0, combi_1.seq)("CATEGORY", _1.BDEFName));
|
|
57226
|
+
return (0, combi_1.seq)((0, combi_1.optPrio)("MANAGED"), "EVENT", _1.BDEFName, (0, combi_1.starPrio)(tail), ";");
|
|
57227
|
+
}
|
|
57228
|
+
}
|
|
57229
|
+
exports.BDEFEvent = BDEFEvent;
|
|
57230
|
+
//# sourceMappingURL=bdef_event.js.map
|
|
57231
|
+
|
|
57232
|
+
/***/ },
|
|
57233
|
+
|
|
57234
|
+
/***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_field.js"
|
|
57235
|
+
/*!******************************************************************************!*\
|
|
57236
|
+
!*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_field.js ***!
|
|
57237
|
+
\******************************************************************************/
|
|
57238
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
57239
|
+
|
|
57240
|
+
"use strict";
|
|
57241
|
+
|
|
57242
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
57243
|
+
exports.BDEFField = void 0;
|
|
57244
|
+
const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js");
|
|
57245
|
+
const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
57246
|
+
/** field characteristics, eg. "field ( readonly, numbering : managed ) ID, CreatedBy;" */
|
|
57247
|
+
class BDEFField extends combi_1.Expression {
|
|
57248
|
+
getRunnable() {
|
|
57249
|
+
return (0, combi_1.seq)("FIELD", _1.BDEFOptions, _1.BDEFFieldPath, (0, combi_1.starPrio)((0, combi_1.seq)(",", _1.BDEFFieldPath)), (0, combi_1.optPrio)(","), ";");
|
|
57250
|
+
}
|
|
57251
|
+
}
|
|
57252
|
+
exports.BDEFField = BDEFField;
|
|
57253
|
+
//# sourceMappingURL=bdef_field.js.map
|
|
57254
|
+
|
|
57255
|
+
/***/ },
|
|
57256
|
+
|
|
57257
|
+
/***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_field_path.js"
|
|
57258
|
+
/*!***********************************************************************************!*\
|
|
57259
|
+
!*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_field_path.js ***!
|
|
57260
|
+
\***********************************************************************************/
|
|
57261
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
57262
|
+
|
|
57263
|
+
"use strict";
|
|
57264
|
+
|
|
57265
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
57266
|
+
exports.BDEFFieldPath = void 0;
|
|
57267
|
+
const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js");
|
|
57268
|
+
const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
57269
|
+
/** field or association, possibly via associations, eg. "_Root.TotalPieces" */
|
|
57270
|
+
class BDEFFieldPath extends combi_1.Expression {
|
|
57271
|
+
getRunnable() {
|
|
57272
|
+
return (0, combi_1.seq)(_1.BDEFName, (0, combi_1.starPrio)((0, combi_1.seq)(".", _1.BDEFName)));
|
|
57273
|
+
}
|
|
57274
|
+
}
|
|
57275
|
+
exports.BDEFFieldPath = BDEFFieldPath;
|
|
57276
|
+
//# sourceMappingURL=bdef_field_path.js.map
|
|
57277
|
+
|
|
57278
|
+
/***/ },
|
|
57279
|
+
|
|
57280
|
+
/***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_header.js"
|
|
57281
|
+
/*!*******************************************************************************!*\
|
|
57282
|
+
!*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_header.js ***!
|
|
57283
|
+
\*******************************************************************************/
|
|
57284
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
57285
|
+
|
|
57286
|
+
"use strict";
|
|
57287
|
+
|
|
57288
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
57289
|
+
exports.BDEFHeader = void 0;
|
|
57290
|
+
const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js");
|
|
57291
|
+
const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
57292
|
+
/** header statements following the implementation type, eg. "strict ( 2 );" or "with draft;" */
|
|
57293
|
+
class BDEFHeader extends combi_1.Expression {
|
|
57294
|
+
getRunnable() {
|
|
57295
|
+
const extensibleItem = (0, combi_1.seq)("WITH", (0, combi_1.plusPrio)((0, combi_1.regex)(/^\w+$/)), ";");
|
|
57296
|
+
const extensible = (0, combi_1.seq)("EXTENSIBLE", (0, combi_1.optPrio)((0, combi_1.seq)("{", (0, combi_1.starPrio)(extensibleItem), "}")), (0, combi_1.optPrio)(";"));
|
|
57297
|
+
return (0, combi_1.altPrio)((0, combi_1.seq)("STRICT", (0, combi_1.optPrio)((0, combi_1.seq)("(", (0, combi_1.regex)(/^\d+$/), ")")), ";"), (0, combi_1.seq)("WITH DRAFT", ";"), (0, combi_1.seq)("USE DRAFT", (0, combi_1.optPrio)("AS DEPENDENT"), ";"), (0, combi_1.seq)((0, combi_1.altPrio)("WITH", "USE"), "COLLABORATIVE DRAFT", ";"), (0, combi_1.seq)("WITH PRIVILEGED MODE", (0, combi_1.optPrio)((0, combi_1.seq)("DISABLING", _1.BDEFName)), ";"), (0, combi_1.seq)("WITH MANAGED INSTANCE FILTER", ";"), (0, combi_1.seq)("WITH HIERARCHY", ";"), (0, combi_1.seq)("WITH CROSS ASSOCIATIONS", ";"), (0, combi_1.seq)("USE SIDE EFFECTS", ";"), (0, combi_1.seq)("USE RECOMMENDATIONS", ";"), (0, combi_1.seq)("FOREIGN ENTITY", _1.BDEFName, (0, combi_1.optPrio)(_1.BDEFAlias), ";"), (0, combi_1.seq)("SCALAR ENTITY", _1.BDEFName, "FIELD", _1.BDEFName, ";"), (0, combi_1.seq)("AUXILIARY CLASS", _1.BDEFName, ";"), extensible);
|
|
57298
|
+
}
|
|
57299
|
+
}
|
|
57300
|
+
exports.BDEFHeader = BDEFHeader;
|
|
57301
|
+
//# sourceMappingURL=bdef_header.js.map
|
|
57302
|
+
|
|
57303
|
+
/***/ },
|
|
57304
|
+
|
|
57305
|
+
/***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_hierarchy.js"
|
|
57306
|
+
/*!**********************************************************************************!*\
|
|
57307
|
+
!*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_hierarchy.js ***!
|
|
57308
|
+
\**********************************************************************************/
|
|
57309
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
57310
|
+
|
|
57311
|
+
"use strict";
|
|
57312
|
+
|
|
57313
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
57314
|
+
exports.BDEFHierarchy = void 0;
|
|
57315
|
+
const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js");
|
|
57316
|
+
const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
57317
|
+
/** eg. "instance hierarchy /DMO/I_EmployeeHN { managed reorder action changeNextSibling; ascending association _Manager; }" */
|
|
57318
|
+
class BDEFHierarchy extends combi_1.Expression {
|
|
57319
|
+
getRunnable() {
|
|
57320
|
+
const action = (0, combi_1.seq)((0, combi_1.optPrio)("MANAGED"), (0, combi_1.altPrio)("REORDER", "COPY"), "ACTION", _1.BDEFName, ";");
|
|
57321
|
+
const association = (0, combi_1.seq)((0, combi_1.altPrio)("ASCENDING", "DESCENDING"), "ASSOCIATION", _1.BDEFName, (0, combi_1.altPrio)(";", _1.BDEFAssociationBody));
|
|
57322
|
+
const item = (0, combi_1.altPrio)(action, association, _1.BDEFField, ";");
|
|
57323
|
+
return (0, combi_1.seq)("INSTANCE HIERARCHY", _1.BDEFName, "{", (0, combi_1.starPrio)(item), "}");
|
|
57324
|
+
}
|
|
57325
|
+
}
|
|
57326
|
+
exports.BDEFHierarchy = BDEFHierarchy;
|
|
57327
|
+
//# sourceMappingURL=bdef_hierarchy.js.map
|
|
57328
|
+
|
|
57329
|
+
/***/ },
|
|
57330
|
+
|
|
57331
|
+
/***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_implementation_in.js"
|
|
57332
|
+
/*!******************************************************************************************!*\
|
|
57333
|
+
!*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_implementation_in.js ***!
|
|
57334
|
+
\******************************************************************************************/
|
|
57335
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
57336
|
+
|
|
57337
|
+
"use strict";
|
|
57338
|
+
|
|
57339
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
57340
|
+
exports.BDEFImplementationIn = void 0;
|
|
57341
|
+
const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js");
|
|
57342
|
+
const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
57343
|
+
class BDEFImplementationIn extends combi_1.Expression {
|
|
57344
|
+
getRunnable() {
|
|
57345
|
+
return (0, combi_1.seq)("IMPLEMENTATION IN CLASS", _1.BDEFName, (0, combi_1.optPrio)("UNIQUE"));
|
|
57346
|
+
}
|
|
57347
|
+
}
|
|
57348
|
+
exports.BDEFImplementationIn = BDEFImplementationIn;
|
|
57349
|
+
//# sourceMappingURL=bdef_implementation_in.js.map
|
|
57350
|
+
|
|
57351
|
+
/***/ },
|
|
57352
|
+
|
|
57353
|
+
/***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_implementation_type.js"
|
|
57354
|
+
/*!********************************************************************************************!*\
|
|
57355
|
+
!*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_implementation_type.js ***!
|
|
57356
|
+
\********************************************************************************************/
|
|
57357
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
57358
|
+
|
|
57359
|
+
"use strict";
|
|
57360
|
+
|
|
57361
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
57362
|
+
exports.BDEFImplementationType = void 0;
|
|
57363
|
+
const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js");
|
|
57364
|
+
const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
57365
|
+
/** first statement, eg. "managed with additional save implementation in class zbp_travel unique;" */
|
|
57366
|
+
class BDEFImplementationType extends combi_1.Expression {
|
|
57367
|
+
getRunnable() {
|
|
57368
|
+
const extension = (0, combi_1.seq)("EXTENSION", (0, combi_1.optPrio)((0, combi_1.altPrio)((0, combi_1.seq)("USING INTERFACE", _1.BDEFName), (0, combi_1.seq)("FOR", (0, combi_1.altPrio)("PROJECTION", "INTERFACE")))));
|
|
57369
|
+
const type = (0, combi_1.altPrio)("MANAGED", "UNMANAGED", "ABSTRACT", "PROJECTION", "INTERFACE", extension,
|
|
57370
|
+
// old syntax, eg. "implementation unmanaged;"
|
|
57371
|
+
(0, combi_1.seq)("IMPLEMENTATION", (0, combi_1.altPrio)("MANAGED", "UNMANAGED", "ABSTRACT", "PROJECTION")));
|
|
57372
|
+
const save = (0, combi_1.seq)((0, combi_1.altPrio)("WITH ADDITIONAL SAVE", "WITH UNMANAGED SAVE"), (0, combi_1.optPrio)("AND CLEANUP"), (0, combi_1.optPrio)("WITH FULL DATA"));
|
|
57373
|
+
const option = (0, combi_1.altPrio)(_1.BDEFImplementationIn, save);
|
|
57374
|
+
return (0, combi_1.seq)(type, (0, combi_1.starPrio)(option), ";");
|
|
57375
|
+
}
|
|
57376
|
+
}
|
|
57377
|
+
exports.BDEFImplementationType = BDEFImplementationType;
|
|
57378
|
+
//# sourceMappingURL=bdef_implementation_type.js.map
|
|
57379
|
+
|
|
57380
|
+
/***/ },
|
|
57381
|
+
|
|
57382
|
+
/***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_key.js"
|
|
57383
|
+
/*!****************************************************************************!*\
|
|
57384
|
+
!*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_key.js ***!
|
|
57385
|
+
\****************************************************************************/
|
|
57386
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
57387
|
+
|
|
57388
|
+
"use strict";
|
|
57389
|
+
|
|
57390
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
57391
|
+
exports.BDEFKey = void 0;
|
|
57392
|
+
const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js");
|
|
57393
|
+
const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
57394
|
+
/** alternative key, eg. "define pure key AlternativeKey { id; }" */
|
|
57395
|
+
class BDEFKey extends combi_1.Expression {
|
|
57396
|
+
getRunnable() {
|
|
57397
|
+
const fields = (0, combi_1.seq)(_1.BDEFName, (0, combi_1.starPrio)((0, combi_1.seq)(",", _1.BDEFName)), ";");
|
|
57398
|
+
return (0, combi_1.seq)("DEFINE", (0, combi_1.optPrio)("PURE"), "KEY", _1.BDEFName, "{", (0, combi_1.starPrio)(fields), "}");
|
|
57399
|
+
}
|
|
57400
|
+
}
|
|
57401
|
+
exports.BDEFKey = BDEFKey;
|
|
57402
|
+
//# sourceMappingURL=bdef_key.js.map
|
|
57403
|
+
|
|
57404
|
+
/***/ },
|
|
57405
|
+
|
|
57406
|
+
/***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_mapping.js"
|
|
57407
|
+
/*!********************************************************************************!*\
|
|
57408
|
+
!*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_mapping.js ***!
|
|
57409
|
+
\********************************************************************************/
|
|
57410
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
57411
|
+
|
|
57412
|
+
"use strict";
|
|
57413
|
+
|
|
57414
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
57415
|
+
exports.BDEFMapping = void 0;
|
|
57416
|
+
const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js");
|
|
57417
|
+
const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
57418
|
+
/** eg. "mapping for ztravel corresponding { TravelID = travel_id; }" */
|
|
57419
|
+
class BDEFMapping extends combi_1.Expression {
|
|
57420
|
+
getRunnable() {
|
|
57421
|
+
const names = (0, combi_1.seq)(_1.BDEFName, (0, combi_1.starPrio)((0, combi_1.seq)(",", _1.BDEFName)));
|
|
57422
|
+
const line = (0, combi_1.seq)(_1.BDEFName, "=", _1.BDEFName, (0, combi_1.optPrio)((0, combi_1.seq)("CONTROL", _1.BDEFName)), ";");
|
|
57423
|
+
// deep mapping of a sub node, eg. "sub _Items = items;"
|
|
57424
|
+
const sub = (0, combi_1.seq)("SUB", _1.BDEFName, "=", _1.BDEFName, ";");
|
|
57425
|
+
const body = (0, combi_1.seq)("{", (0, combi_1.starPrio)((0, combi_1.altPrio)(sub, line, ";")), "}");
|
|
57426
|
+
const option = (0, combi_1.altPrio)("CORRESPONDING", "EXTENSIBLE", (0, combi_1.seq)("EXCEPT", names), (0, combi_1.seq)("CONTROL", _1.BDEFName));
|
|
57427
|
+
return (0, combi_1.seq)((0, combi_1.optPrio)("DEEP"), "MAPPING FOR", _1.BDEFName, (0, combi_1.starPrio)(option), (0, combi_1.altPrio)(";", body));
|
|
57428
|
+
}
|
|
57429
|
+
}
|
|
57430
|
+
exports.BDEFMapping = BDEFMapping;
|
|
57431
|
+
//# sourceMappingURL=bdef_mapping.js.map
|
|
57432
|
+
|
|
57433
|
+
/***/ },
|
|
57434
|
+
|
|
57435
|
+
/***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_name.js"
|
|
57436
|
+
/*!*****************************************************************************!*\
|
|
57437
|
+
!*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_name.js ***!
|
|
57438
|
+
\*****************************************************************************/
|
|
57439
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
57440
|
+
|
|
57441
|
+
"use strict";
|
|
57442
|
+
|
|
57443
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
57444
|
+
exports.BDEFName = void 0;
|
|
57445
|
+
const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
57446
|
+
class BDEFName extends combi_1.Expression {
|
|
57447
|
+
getRunnable() {
|
|
57448
|
+
const word = (0, combi_1.regex)(/^\$?\w+$/);
|
|
57449
|
+
const slashName = (0, combi_1.seq)("/", (0, combi_1.regex)(/^\w+$/), "/", (0, combi_1.regex)(/^\w+$/));
|
|
57450
|
+
return (0, combi_1.altPrio)(slashName, word);
|
|
57451
|
+
}
|
|
57452
|
+
}
|
|
57453
|
+
exports.BDEFName = BDEFName;
|
|
57454
|
+
//# sourceMappingURL=bdef_name.js.map
|
|
57455
|
+
|
|
57456
|
+
/***/ },
|
|
57457
|
+
|
|
57458
|
+
/***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_operation.js"
|
|
57459
|
+
/*!**********************************************************************************!*\
|
|
57460
|
+
!*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_operation.js ***!
|
|
57461
|
+
\**********************************************************************************/
|
|
57462
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
57463
|
+
|
|
57464
|
+
"use strict";
|
|
57465
|
+
|
|
57466
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
57467
|
+
exports.BDEFOperation = void 0;
|
|
57468
|
+
const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js");
|
|
57469
|
+
const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
57470
|
+
/** standard operations, eg. "internal create ( features : global );" */
|
|
57471
|
+
class BDEFOperation extends combi_1.Expression {
|
|
57472
|
+
getRunnable() {
|
|
57473
|
+
return (0, combi_1.seq)((0, combi_1.starPrio)((0, combi_1.altPrio)("INTERNAL", "STATIC")), (0, combi_1.altPrio)("CREATE", "UPDATE", "DELETE"), (0, combi_1.optPrio)(_1.BDEFOptions), (0, combi_1.altPrio)(";", _1.BDEFDefaultFunction));
|
|
57474
|
+
}
|
|
57475
|
+
}
|
|
57476
|
+
exports.BDEFOperation = BDEFOperation;
|
|
57477
|
+
//# sourceMappingURL=bdef_operation.js.map
|
|
57478
|
+
|
|
57479
|
+
/***/ },
|
|
57480
|
+
|
|
57481
|
+
/***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_options.js"
|
|
57482
|
+
/*!********************************************************************************!*\
|
|
57483
|
+
!*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_options.js ***!
|
|
57484
|
+
\********************************************************************************/
|
|
57485
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
57486
|
+
|
|
57487
|
+
"use strict";
|
|
57488
|
+
|
|
57489
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
57490
|
+
exports.BDEFOptions = void 0;
|
|
57491
|
+
const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js");
|
|
57492
|
+
const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
57493
|
+
/** eg. "( features : instance, precheck )", "( read only )" or "( hierarchy-index )" */
|
|
57494
|
+
class BDEFOptions extends combi_1.Expression {
|
|
57495
|
+
getRunnable() {
|
|
57496
|
+
const name = (0, combi_1.seq)(_1.BDEFName, (0, combi_1.starPrio)((0, combi_1.altPrio)((0, combi_1.seq)("-", _1.BDEFName), _1.BDEFName)));
|
|
57497
|
+
const option = (0, combi_1.seq)(name, (0, combi_1.optPrio)((0, combi_1.seq)(":", _1.BDEFName)));
|
|
57498
|
+
return (0, combi_1.seq)("(", option, (0, combi_1.starPrio)((0, combi_1.seq)(",", option)), ")");
|
|
57499
|
+
}
|
|
57500
|
+
}
|
|
57501
|
+
exports.BDEFOptions = BDEFOptions;
|
|
57502
|
+
//# sourceMappingURL=bdef_options.js.map
|
|
57503
|
+
|
|
57504
|
+
/***/ },
|
|
57505
|
+
|
|
57506
|
+
/***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_parameter.js"
|
|
57507
|
+
/*!**********************************************************************************!*\
|
|
57508
|
+
!*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_parameter.js ***!
|
|
57509
|
+
\**********************************************************************************/
|
|
57510
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
57511
|
+
|
|
57512
|
+
"use strict";
|
|
57513
|
+
|
|
57514
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
57515
|
+
exports.BDEFParameter = void 0;
|
|
57516
|
+
const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js");
|
|
57517
|
+
const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
57518
|
+
/** eg. "deep parameter ZD_PARAMETER" */
|
|
57519
|
+
class BDEFParameter extends combi_1.Expression {
|
|
57520
|
+
getRunnable() {
|
|
57521
|
+
return (0, combi_1.seq)((0, combi_1.optPrio)("DEEP"), "PARAMETER", _1.BDEFName);
|
|
57522
|
+
}
|
|
57523
|
+
}
|
|
57524
|
+
exports.BDEFParameter = BDEFParameter;
|
|
57525
|
+
//# sourceMappingURL=bdef_parameter.js.map
|
|
57526
|
+
|
|
57527
|
+
/***/ },
|
|
57528
|
+
|
|
57529
|
+
/***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_reference.js"
|
|
57530
|
+
/*!**********************************************************************************!*\
|
|
57531
|
+
!*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_reference.js ***!
|
|
57532
|
+
\**********************************************************************************/
|
|
57533
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
57534
|
+
|
|
57535
|
+
"use strict";
|
|
57536
|
+
|
|
57537
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
57538
|
+
exports.BDEFReference = void 0;
|
|
57539
|
+
const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js");
|
|
57540
|
+
const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
57541
|
+
/** reference to a determination, validation or action, optionally prefixed with an entity, eg. "Child ~ validatePercentage" */
|
|
57542
|
+
class BDEFReference extends combi_1.Expression {
|
|
57543
|
+
getRunnable() {
|
|
57544
|
+
const namespace = (0, combi_1.seq)("/", (0, combi_1.regex)(/^\w+$/), "/");
|
|
57545
|
+
const tildeEnd = (0, combi_1.regex)(/^\w+~$/);
|
|
57546
|
+
return (0, combi_1.altPrio)((0, combi_1.seq)(_1.BDEFName, "~", _1.BDEFName), (0, combi_1.seq)(_1.BDEFName, (0, combi_1.regex)(/^~\w+$/)), (0, combi_1.seq)((0, combi_1.optPrio)(namespace), tildeEnd, _1.BDEFName), (0, combi_1.seq)((0, combi_1.optPrio)(namespace), (0, combi_1.regex)(/^\w+~\w+$/)), _1.BDEFName);
|
|
57547
|
+
}
|
|
57548
|
+
}
|
|
57549
|
+
exports.BDEFReference = BDEFReference;
|
|
57550
|
+
//# sourceMappingURL=bdef_reference.js.map
|
|
57551
|
+
|
|
57552
|
+
/***/ },
|
|
57553
|
+
|
|
57554
|
+
/***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_result.js"
|
|
57555
|
+
/*!*******************************************************************************!*\
|
|
57556
|
+
!*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_result.js ***!
|
|
57557
|
+
\*******************************************************************************/
|
|
57558
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
57559
|
+
|
|
57560
|
+
"use strict";
|
|
57561
|
+
|
|
57562
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
57563
|
+
exports.BDEFResult = void 0;
|
|
57564
|
+
const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js");
|
|
57565
|
+
const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
57566
|
+
/** eg. "result [1] $self", "deep result ZD_RESULT" or "result selective [0..*] entity ZI_Travel" */
|
|
57567
|
+
class BDEFResult extends combi_1.Expression {
|
|
57568
|
+
getRunnable() {
|
|
57569
|
+
return (0, combi_1.seq)((0, combi_1.optPrio)("DEEP"), "RESULT", (0, combi_1.optPrio)("SELECTIVE"), (0, combi_1.optPrio)(_1.BDEFCardinality), (0, combi_1.optPrio)("ENTITY"), _1.BDEFName);
|
|
57570
|
+
}
|
|
57571
|
+
}
|
|
57572
|
+
exports.BDEFResult = BDEFResult;
|
|
57573
|
+
//# sourceMappingURL=bdef_result.js.map
|
|
57574
|
+
|
|
57575
|
+
/***/ },
|
|
57576
|
+
|
|
57577
|
+
/***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_side_effects.js"
|
|
57578
|
+
/*!*************************************************************************************!*\
|
|
57579
|
+
!*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_side_effects.js ***!
|
|
57580
|
+
\*************************************************************************************/
|
|
57581
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
57582
|
+
|
|
57583
|
+
"use strict";
|
|
57584
|
+
|
|
57585
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
57586
|
+
exports.BDEFSideEffects = void 0;
|
|
57587
|
+
const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js");
|
|
57588
|
+
const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
57589
|
+
/** eg. "side effects { field Price affects field TotalPrice, messages; }" */
|
|
57590
|
+
class BDEFSideEffects extends combi_1.Expression {
|
|
57591
|
+
getRunnable() {
|
|
57592
|
+
const fieldList = (0, combi_1.seq)("(", _1.BDEFName, (0, combi_1.starPrio)((0, combi_1.seq)(",", _1.BDEFName)), ")");
|
|
57593
|
+
// eg. "field *", "field ( A, B )", "field _Item.*" or "field _Root.( A, B )"
|
|
57594
|
+
const field = (0, combi_1.seq)("FIELD", (0, combi_1.altPrio)("*", fieldList, (0, combi_1.seq)(_1.BDEFName, (0, combi_1.starPrio)((0, combi_1.seq)(".", (0, combi_1.altPrio)("*", fieldList, _1.BDEFName))))));
|
|
57595
|
+
const permission = (0, combi_1.altPrio)((0, combi_1.seq)("ACTION", _1.BDEFReference), field, (0, combi_1.seq)((0, combi_1.altPrio)("CREATE", "UPDATE", "DELETE"), (0, combi_1.optPrio)(_1.BDEFName)));
|
|
57596
|
+
const permissions = (0, combi_1.seq)("PERMISSIONS", "(", permission, (0, combi_1.starPrio)((0, combi_1.seq)(",", permission)), ")");
|
|
57597
|
+
const target = (0, combi_1.altPrio)(field, (0, combi_1.seq)("ENTITY", _1.BDEFFieldPath), "MESSAGES", permissions, "$SELF");
|
|
57598
|
+
const targets = (0, combi_1.seq)(target, (0, combi_1.starPrio)((0, combi_1.seq)(",", target)));
|
|
57599
|
+
const trigger = (0, combi_1.altPrio)(field, (0, combi_1.seq)("ENTITY", _1.BDEFFieldPath), "$SELF");
|
|
57600
|
+
const triggers = (0, combi_1.seq)(trigger, (0, combi_1.starPrio)((0, combi_1.seq)(",", trigger)));
|
|
57601
|
+
const source = (0, combi_1.altPrio)(field, (0, combi_1.seq)("ACTION", _1.BDEFReference), (0, combi_1.seq)("DETERMINE ACTION", _1.BDEFReference, "EXECUTED ON", triggers), (0, combi_1.seq)("ENTITY", _1.BDEFFieldPath), (0, combi_1.seq)("EVENT", _1.BDEFName), "$SELF");
|
|
57602
|
+
const recommendation = (0, combi_1.seq)("RECOMMENDATION FUNCTION", _1.BDEFName, "EXECUTED ON", triggers, ";");
|
|
57603
|
+
const item = (0, combi_1.altPrio)((0, combi_1.seq)(source, "AFFECTS", targets, ";"), recommendation, ";");
|
|
57604
|
+
return (0, combi_1.seq)("SIDE EFFECTS", "{", (0, combi_1.starPrio)(item), "}");
|
|
57605
|
+
}
|
|
57606
|
+
}
|
|
57607
|
+
exports.BDEFSideEffects = BDEFSideEffects;
|
|
57608
|
+
//# sourceMappingURL=bdef_side_effects.js.map
|
|
57609
|
+
|
|
57610
|
+
/***/ },
|
|
57611
|
+
|
|
57612
|
+
/***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_string.js"
|
|
57613
|
+
/*!*******************************************************************************!*\
|
|
57614
|
+
!*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_string.js ***!
|
|
57615
|
+
\*******************************************************************************/
|
|
57616
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
57617
|
+
|
|
57618
|
+
"use strict";
|
|
57619
|
+
|
|
57620
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
57621
|
+
exports.BDEFString = void 0;
|
|
57622
|
+
const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
57623
|
+
class BDEFString extends combi_1.Expression {
|
|
57624
|
+
getRunnable() {
|
|
57625
|
+
return (0, combi_1.regex)(/^'(?:[^']|'')*'$/);
|
|
57626
|
+
}
|
|
57627
|
+
}
|
|
57628
|
+
exports.BDEFString = BDEFString;
|
|
57629
|
+
//# sourceMappingURL=bdef_string.js.map
|
|
57630
|
+
|
|
57631
|
+
/***/ },
|
|
57632
|
+
|
|
57633
|
+
/***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_use.js"
|
|
57634
|
+
/*!****************************************************************************!*\
|
|
57635
|
+
!*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_use.js ***!
|
|
57636
|
+
\****************************************************************************/
|
|
57637
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
57638
|
+
|
|
57639
|
+
"use strict";
|
|
57640
|
+
|
|
57641
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
57642
|
+
exports.BDEFUse = void 0;
|
|
57643
|
+
const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js");
|
|
57644
|
+
const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
57645
|
+
/** reuse in projections and interfaces, eg. "use action acceptTravel as accept;" */
|
|
57646
|
+
class BDEFUse extends combi_1.Expression {
|
|
57647
|
+
getRunnable() {
|
|
57648
|
+
const end = (0, combi_1.altPrio)(";", _1.BDEFDefaultFunction);
|
|
57649
|
+
const operation = (0, combi_1.seq)((0, combi_1.altPrio)("CREATE", "UPDATE", "DELETE"), (0, combi_1.optPrio)(_1.BDEFOptions), end);
|
|
57650
|
+
const actionTail = (0, combi_1.altPrio)((0, combi_1.seq)("AS", _1.BDEFName), (0, combi_1.seq)("EXTERNAL", _1.BDEFString), _1.BDEFParameter, _1.BDEFResult);
|
|
57651
|
+
const action = (0, combi_1.seq)((0, combi_1.altPrio)("ACTION", "FUNCTION"), (0, combi_1.optPrio)(_1.BDEFOptions), _1.BDEFName, (0, combi_1.starPrio)(actionTail), end);
|
|
57652
|
+
const association = (0, combi_1.seq)("ASSOCIATION", (0, combi_1.optPrio)(_1.BDEFOptions), _1.BDEFName, (0, combi_1.optPrio)((0, combi_1.seq)("ABBREVIATION", _1.BDEFName)), (0, combi_1.altPrio)(";", _1.BDEFAssociationBody));
|
|
57653
|
+
return (0, combi_1.seq)("USE", (0, combi_1.altPrio)(operation, action, association, (0, combi_1.seq)("ETAG", ";"), (0, combi_1.seq)("SIDE EFFECTS", ";"), (0, combi_1.seq)("KEY", _1.BDEFName, ";"), (0, combi_1.seq)("EVENT", _1.BDEFName, (0, combi_1.optPrio)(_1.BDEFParameter), ";")));
|
|
57654
|
+
}
|
|
57655
|
+
}
|
|
57656
|
+
exports.BDEFUse = BDEFUse;
|
|
57657
|
+
//# sourceMappingURL=bdef_use.js.map
|
|
57658
|
+
|
|
57659
|
+
/***/ },
|
|
57660
|
+
|
|
57661
|
+
/***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js"
|
|
57662
|
+
/*!*************************************************************************!*\
|
|
57663
|
+
!*** ./node_modules/@abaplint/core/build/src/bdef/expressions/index.js ***!
|
|
57664
|
+
\*************************************************************************/
|
|
57665
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
57666
|
+
|
|
57667
|
+
"use strict";
|
|
57668
|
+
|
|
57669
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
57670
|
+
if (k2 === undefined) k2 = k;
|
|
57671
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
57672
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
57673
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
57674
|
+
}
|
|
57675
|
+
Object.defineProperty(o, k2, desc);
|
|
57676
|
+
}) : (function(o, m, k, k2) {
|
|
57677
|
+
if (k2 === undefined) k2 = k;
|
|
57678
|
+
o[k2] = m[k];
|
|
57679
|
+
}));
|
|
57680
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
57681
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
57682
|
+
};
|
|
57683
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
57684
|
+
__exportStar(__webpack_require__(/*! ./bdef_action */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_action.js"), exports);
|
|
57685
|
+
__exportStar(__webpack_require__(/*! ./bdef_alias */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_alias.js"), exports);
|
|
57686
|
+
__exportStar(__webpack_require__(/*! ./bdef_association_body */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_association_body.js"), exports);
|
|
57687
|
+
__exportStar(__webpack_require__(/*! ./bdef_association */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_association.js"), exports);
|
|
57688
|
+
__exportStar(__webpack_require__(/*! ./bdef_authorization_context */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_authorization_context.js"), exports);
|
|
57689
|
+
__exportStar(__webpack_require__(/*! ./bdef_cardinality */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_cardinality.js"), exports);
|
|
57690
|
+
__exportStar(__webpack_require__(/*! ./bdef_default_function */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_default_function.js"), exports);
|
|
57691
|
+
__exportStar(__webpack_require__(/*! ./bdef_define_behavior */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_define_behavior.js"), exports);
|
|
57692
|
+
__exportStar(__webpack_require__(/*! ./bdef_definition */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_definition.js"), exports);
|
|
57693
|
+
__exportStar(__webpack_require__(/*! ./bdef_determination */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_determination.js"), exports);
|
|
57694
|
+
__exportStar(__webpack_require__(/*! ./bdef_determine_action */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_determine_action.js"), exports);
|
|
57695
|
+
__exportStar(__webpack_require__(/*! ./bdef_event */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_event.js"), exports);
|
|
57696
|
+
__exportStar(__webpack_require__(/*! ./bdef_field_path */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_field_path.js"), exports);
|
|
57697
|
+
__exportStar(__webpack_require__(/*! ./bdef_field */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_field.js"), exports);
|
|
57698
|
+
__exportStar(__webpack_require__(/*! ./bdef_header */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_header.js"), exports);
|
|
57699
|
+
__exportStar(__webpack_require__(/*! ./bdef_hierarchy */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_hierarchy.js"), exports);
|
|
57700
|
+
__exportStar(__webpack_require__(/*! ./bdef_implementation_in */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_implementation_in.js"), exports);
|
|
57701
|
+
__exportStar(__webpack_require__(/*! ./bdef_implementation_type */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_implementation_type.js"), exports);
|
|
57702
|
+
__exportStar(__webpack_require__(/*! ./bdef_key */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_key.js"), exports);
|
|
57703
|
+
__exportStar(__webpack_require__(/*! ./bdef_mapping */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_mapping.js"), exports);
|
|
57704
|
+
__exportStar(__webpack_require__(/*! ./bdef_name */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_name.js"), exports);
|
|
57705
|
+
__exportStar(__webpack_require__(/*! ./bdef_operation */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_operation.js"), exports);
|
|
57706
|
+
__exportStar(__webpack_require__(/*! ./bdef_options */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_options.js"), exports);
|
|
57707
|
+
__exportStar(__webpack_require__(/*! ./bdef_parameter */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_parameter.js"), exports);
|
|
57708
|
+
__exportStar(__webpack_require__(/*! ./bdef_reference */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_reference.js"), exports);
|
|
57709
|
+
__exportStar(__webpack_require__(/*! ./bdef_result */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_result.js"), exports);
|
|
57710
|
+
__exportStar(__webpack_require__(/*! ./bdef_side_effects */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_side_effects.js"), exports);
|
|
57711
|
+
__exportStar(__webpack_require__(/*! ./bdef_string */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_string.js"), exports);
|
|
57712
|
+
__exportStar(__webpack_require__(/*! ./bdef_use */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_use.js"), exports);
|
|
57713
|
+
//# sourceMappingURL=index.js.map
|
|
57714
|
+
|
|
57715
|
+
/***/ },
|
|
57716
|
+
|
|
56647
57717
|
/***/ "./node_modules/@abaplint/core/build/src/cds/cds_determine_types.js"
|
|
56648
57718
|
/*!**************************************************************************!*\
|
|
56649
57719
|
!*** ./node_modules/@abaplint/core/build/src/cds/cds_determine_types.js ***!
|
|
@@ -64286,6 +65356,8 @@ exports.BADIDefinition = BADIDefinition;
|
|
|
64286
65356
|
|
|
64287
65357
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
64288
65358
|
exports.BehaviorDefinition = void 0;
|
|
65359
|
+
const bdef_parser_1 = __webpack_require__(/*! ../bdef/bdef_parser */ "./node_modules/@abaplint/core/build/src/bdef/bdef_parser.js");
|
|
65360
|
+
const expressions_1 = __webpack_require__(/*! ../bdef/expressions */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js");
|
|
64289
65361
|
const _abstract_object_1 = __webpack_require__(/*! ./_abstract_object */ "./node_modules/@abaplint/core/build/src/objects/_abstract_object.js");
|
|
64290
65362
|
class BehaviorDefinition extends _abstract_object_1.AbstractObject {
|
|
64291
65363
|
constructor() {
|
|
@@ -64308,8 +65380,30 @@ class BehaviorDefinition extends _abstract_object_1.AbstractObject {
|
|
|
64308
65380
|
findSourceFile() {
|
|
64309
65381
|
return this.getFiles().find(f => f.getFilename().endsWith(".asbdef"));
|
|
64310
65382
|
}
|
|
65383
|
+
parse() {
|
|
65384
|
+
if (this.isDirty() === false && this.parsedData !== undefined) {
|
|
65385
|
+
return { updated: false, runtime: 0 };
|
|
65386
|
+
}
|
|
65387
|
+
const start = Date.now();
|
|
65388
|
+
const tree = new bdef_parser_1.BDEFParser().parse(this.findSourceFile());
|
|
65389
|
+
this.parsedData = {
|
|
65390
|
+
entities: tree ? this.findEntities(tree) : this.findEntitiesFallback(),
|
|
65391
|
+
tree,
|
|
65392
|
+
};
|
|
65393
|
+
this.dirty = false;
|
|
65394
|
+
return { updated: true, runtime: Date.now() - start };
|
|
65395
|
+
}
|
|
65396
|
+
getTree() {
|
|
65397
|
+
var _a;
|
|
65398
|
+
this.parse();
|
|
65399
|
+
return (_a = this.parsedData) === null || _a === void 0 ? void 0 : _a.tree;
|
|
65400
|
+
}
|
|
65401
|
+
hasParserError() {
|
|
65402
|
+
return this.findSourceFile() !== undefined && this.getTree() === undefined;
|
|
65403
|
+
}
|
|
64311
65404
|
listEntities() {
|
|
64312
|
-
|
|
65405
|
+
this.parse();
|
|
65406
|
+
return this.parsedData.entities;
|
|
64313
65407
|
}
|
|
64314
65408
|
/** finds the entity name for a given alias, undefined if the alias is not defined */
|
|
64315
65409
|
findEntityNameByAlias(alias) {
|
|
@@ -64323,15 +65417,29 @@ class BehaviorDefinition extends _abstract_object_1.AbstractObject {
|
|
|
64323
65417
|
return undefined;
|
|
64324
65418
|
}
|
|
64325
65419
|
/////////////////////////
|
|
64326
|
-
|
|
65420
|
+
findEntities(tree) {
|
|
64327
65421
|
var _a;
|
|
64328
|
-
|
|
64329
|
-
|
|
65422
|
+
const ret = [];
|
|
65423
|
+
for (const define of tree.findDirectExpressions(expressions_1.BDEFDefineBehavior)) {
|
|
65424
|
+
const name = define.findDirectExpression(expressions_1.BDEFName);
|
|
65425
|
+
if (name === undefined) {
|
|
65426
|
+
continue;
|
|
65427
|
+
}
|
|
65428
|
+
const alias = (_a = define.findDirectExpression(expressions_1.BDEFAlias)) === null || _a === void 0 ? void 0 : _a.findDirectExpression(expressions_1.BDEFName);
|
|
65429
|
+
ret.push({
|
|
65430
|
+
name: name.concatTokens().replace(/ /g, ""),
|
|
65431
|
+
alias: alias === null || alias === void 0 ? void 0 : alias.concatTokens().replace(/ /g, ""),
|
|
65432
|
+
});
|
|
64330
65433
|
}
|
|
64331
|
-
|
|
65434
|
+
return ret;
|
|
65435
|
+
}
|
|
65436
|
+
/** used if the source cannot be parsed */
|
|
65437
|
+
findEntitiesFallback() {
|
|
65438
|
+
var _a;
|
|
65439
|
+
const ret = [];
|
|
64332
65440
|
const raw = (_a = this.findSourceFile()) === null || _a === void 0 ? void 0 : _a.getRaw();
|
|
64333
65441
|
if (raw === undefined) {
|
|
64334
|
-
return
|
|
65442
|
+
return ret;
|
|
64335
65443
|
}
|
|
64336
65444
|
// BDEF uses "//" for line comments
|
|
64337
65445
|
const stripped = raw.replace(/\/\/.*$/gm, "");
|
|
@@ -64339,10 +65447,10 @@ class BehaviorDefinition extends _abstract_object_1.AbstractObject {
|
|
|
64339
65447
|
const regex = /\bdefine\s+(?:\w+\s+)*?behavior\s+for\s+([\w/]+)(?:\s+alias\s+(\w+))?/gi;
|
|
64340
65448
|
let match = regex.exec(stripped);
|
|
64341
65449
|
while (match !== null) {
|
|
64342
|
-
|
|
65450
|
+
ret.push({ name: match[1], alias: match[2] });
|
|
64343
65451
|
match = regex.exec(stripped);
|
|
64344
65452
|
}
|
|
64345
|
-
return
|
|
65453
|
+
return ret;
|
|
64346
65454
|
}
|
|
64347
65455
|
}
|
|
64348
65456
|
exports.BehaviorDefinition = BehaviorDefinition;
|
|
@@ -72606,7 +73714,7 @@ class Registry {
|
|
|
72606
73714
|
}
|
|
72607
73715
|
static abaplintVersion() {
|
|
72608
73716
|
// magic, see build script "version.js"
|
|
72609
|
-
return "2.120.
|
|
73717
|
+
return "2.120.86";
|
|
72610
73718
|
}
|
|
72611
73719
|
getDDICReferences() {
|
|
72612
73720
|
return this.ddicReferences;
|
|
@@ -75263,6 +76371,104 @@ exports.AbapdocParameterNames = AbapdocParameterNames;
|
|
|
75263
76371
|
|
|
75264
76372
|
/***/ },
|
|
75265
76373
|
|
|
76374
|
+
/***/ "./node_modules/@abaplint/core/build/src/rules/abapdoc_shorttext_length.js"
|
|
76375
|
+
/*!*********************************************************************************!*\
|
|
76376
|
+
!*** ./node_modules/@abaplint/core/build/src/rules/abapdoc_shorttext_length.js ***!
|
|
76377
|
+
\*********************************************************************************/
|
|
76378
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
76379
|
+
|
|
76380
|
+
"use strict";
|
|
76381
|
+
|
|
76382
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
76383
|
+
exports.AbapdocShorttextLength = exports.AbapdocShorttextLengthConf = void 0;
|
|
76384
|
+
const issue_1 = __webpack_require__(/*! ../issue */ "./node_modules/@abaplint/core/build/src/issue.js");
|
|
76385
|
+
const _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ "./node_modules/@abaplint/core/build/src/rules/_abap_rule.js");
|
|
76386
|
+
const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
|
|
76387
|
+
const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
|
|
76388
|
+
const _statement_1 = __webpack_require__(/*! ../abap/2_statements/statements/_statement */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.js");
|
|
76389
|
+
class AbapdocShorttextLengthConf extends _basic_rule_config_1.BasicRuleConfig {
|
|
76390
|
+
}
|
|
76391
|
+
exports.AbapdocShorttextLengthConf = AbapdocShorttextLengthConf;
|
|
76392
|
+
const MAX_LENGTH = 60;
|
|
76393
|
+
class AbapdocShorttextLength extends _abap_rule_1.ABAPRule {
|
|
76394
|
+
constructor() {
|
|
76395
|
+
super(...arguments);
|
|
76396
|
+
this.conf = new AbapdocShorttextLengthConf();
|
|
76397
|
+
}
|
|
76398
|
+
getMetadata() {
|
|
76399
|
+
return {
|
|
76400
|
+
key: "abapdoc_shorttext_length",
|
|
76401
|
+
title: "ABAP Doc shorttext too long",
|
|
76402
|
+
shortDescription: `Reports ABAP Doc shorttexts longer than 60 characters.`,
|
|
76403
|
+
extendedInformation: `A shorttext is written as <p class="shorttext">...</p> or
|
|
76404
|
+
<p class="shorttext synchronized">...</p>, the system warns "Shorttext must not exceed 60 characters."
|
|
76405
|
+
if the text is longer.
|
|
76406
|
+
|
|
76407
|
+
The text may span several "! lines, line breaks count as one blank. Leading and trailing blanks are not counted,
|
|
76408
|
+
an entity like < counts as one character.`,
|
|
76409
|
+
tags: [_irule_1.RuleTag.SingleFile],
|
|
76410
|
+
badExample: `INTERFACE zif_foo PUBLIC.
|
|
76411
|
+
"! <p class="shorttext synchronized">Returns the name of the selected row in the table of the view</p>
|
|
76412
|
+
METHODS name RETURNING VALUE(result) TYPE string.
|
|
76413
|
+
ENDINTERFACE.`,
|
|
76414
|
+
goodExample: `INTERFACE zif_foo PUBLIC.
|
|
76415
|
+
"! <p class="shorttext synchronized">Returns the name of the selected row</p>
|
|
76416
|
+
METHODS name RETURNING VALUE(result) TYPE string.
|
|
76417
|
+
ENDINTERFACE.`,
|
|
76418
|
+
};
|
|
76419
|
+
}
|
|
76420
|
+
getConfig() {
|
|
76421
|
+
return this.conf;
|
|
76422
|
+
}
|
|
76423
|
+
setConfig(conf) {
|
|
76424
|
+
this.conf = conf;
|
|
76425
|
+
}
|
|
76426
|
+
runParsed(file) {
|
|
76427
|
+
const issues = [];
|
|
76428
|
+
let block = [];
|
|
76429
|
+
for (const statement of file.getStatements()) {
|
|
76430
|
+
const token = statement.getFirstToken();
|
|
76431
|
+
const doc = statement.get() instanceof _statement_1.Comment && token.getStr().startsWith(`"!`);
|
|
76432
|
+
const previous = block[block.length - 1];
|
|
76433
|
+
if (doc === false || (previous !== undefined && token.getStart().getRow() !== previous.getStart().getRow() + 1)) {
|
|
76434
|
+
issues.push(...this.checkBlock(file, block));
|
|
76435
|
+
block = [];
|
|
76436
|
+
}
|
|
76437
|
+
if (doc === true) {
|
|
76438
|
+
block.push(token);
|
|
76439
|
+
}
|
|
76440
|
+
}
|
|
76441
|
+
issues.push(...this.checkBlock(file, block));
|
|
76442
|
+
return issues;
|
|
76443
|
+
}
|
|
76444
|
+
checkBlock(file, block) {
|
|
76445
|
+
const issues = [];
|
|
76446
|
+
if (block.length === 0) {
|
|
76447
|
+
return issues;
|
|
76448
|
+
}
|
|
76449
|
+
const text = block.map(t => t.getStr().substring(2)).join("\n");
|
|
76450
|
+
const regex = /<p\s[^>]*class\s*=\s*"shorttext(?:\s+synchronized)?"[^>]*>([\s\S]*?)<\/p>/gi;
|
|
76451
|
+
let match;
|
|
76452
|
+
while ((match = regex.exec(text)) !== null) {
|
|
76453
|
+
const length = this.decode(match[1].replace(/\s+/g, " ").trim()).length;
|
|
76454
|
+
if (length <= MAX_LENGTH) {
|
|
76455
|
+
continue;
|
|
76456
|
+
}
|
|
76457
|
+
const token = block[text.substring(0, match.index).split("\n").length - 1];
|
|
76458
|
+
const message = `Shorttext must not exceed ${MAX_LENGTH} characters, found ${length}`;
|
|
76459
|
+
issues.push(issue_1.Issue.atToken(file, token, message, this.getMetadata().key, this.conf.severity));
|
|
76460
|
+
}
|
|
76461
|
+
return issues;
|
|
76462
|
+
}
|
|
76463
|
+
decode(text) {
|
|
76464
|
+
return text.replace(/&(#\d+|#x[0-9a-fA-F]+|[a-zA-Z]+);/g, "_");
|
|
76465
|
+
}
|
|
76466
|
+
}
|
|
76467
|
+
exports.AbapdocShorttextLength = AbapdocShorttextLength;
|
|
76468
|
+
//# sourceMappingURL=abapdoc_shorttext_length.js.map
|
|
76469
|
+
|
|
76470
|
+
/***/ },
|
|
76471
|
+
|
|
75266
76472
|
/***/ "./node_modules/@abaplint/core/build/src/rules/add_test_attributes.js"
|
|
75267
76473
|
/*!****************************************************************************!*\
|
|
75268
76474
|
!*** ./node_modules/@abaplint/core/build/src/rules/add_test_attributes.js ***!
|
|
@@ -76716,8 +77922,28 @@ TEST-SEAMS: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md
|
|
|
76716
77922
|
|
|
76717
77923
|
BREAK points`,
|
|
76718
77924
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
|
|
76719
|
-
badExample: `
|
|
76720
|
-
|
|
77925
|
+
badExample: `DEFINE _hello.
|
|
77926
|
+
WRITE 'hello'.
|
|
77927
|
+
END-OF-DEFINITION.
|
|
77928
|
+
|
|
77929
|
+
STATICS count TYPE i.
|
|
77930
|
+
|
|
77931
|
+
TYPES ty_items TYPE STANDARD TABLE OF i WITH DEFAULT KEY.
|
|
77932
|
+
|
|
77933
|
+
BREAK-POINT.
|
|
77934
|
+
|
|
77935
|
+
TEST-SEAM seam_name.
|
|
77936
|
+
count = 1.
|
|
77937
|
+
END-TEST-SEAM.
|
|
77938
|
+
|
|
77939
|
+
DESCRIBE TABLE items LINES count.
|
|
77940
|
+
|
|
77941
|
+
EXPORT data = items TO MEMORY ID 'ZFOO'.
|
|
77942
|
+
|
|
77943
|
+
EXPORT data = items TO DATABASE indx(zz) ID 'ZFOO'.`,
|
|
77944
|
+
goodExample: `count = lines( items ).
|
|
77945
|
+
|
|
77946
|
+
TYPES ty_items TYPE STANDARD TABLE OF i WITH EMPTY KEY.`,
|
|
76721
77947
|
};
|
|
76722
77948
|
}
|
|
76723
77949
|
getDescription(statement) {
|
|
@@ -76814,6 +78040,161 @@ exports.AvoidUse = AvoidUse;
|
|
|
76814
78040
|
|
|
76815
78041
|
/***/ },
|
|
76816
78042
|
|
|
78043
|
+
/***/ "./node_modules/@abaplint/core/build/src/rules/bdef_check_syntax.js"
|
|
78044
|
+
/*!**************************************************************************!*\
|
|
78045
|
+
!*** ./node_modules/@abaplint/core/build/src/rules/bdef_check_syntax.js ***!
|
|
78046
|
+
\**************************************************************************/
|
|
78047
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
78048
|
+
|
|
78049
|
+
"use strict";
|
|
78050
|
+
|
|
78051
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
78052
|
+
exports.BDEFCheckSyntax = exports.BDEFCheckSyntaxConf = void 0;
|
|
78053
|
+
const expressions_1 = __webpack_require__(/*! ../bdef/expressions */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js");
|
|
78054
|
+
const ddic_1 = __webpack_require__(/*! ../ddic */ "./node_modules/@abaplint/core/build/src/ddic.js");
|
|
78055
|
+
const issue_1 = __webpack_require__(/*! ../issue */ "./node_modules/@abaplint/core/build/src/issue.js");
|
|
78056
|
+
const objects_1 = __webpack_require__(/*! ../objects */ "./node_modules/@abaplint/core/build/src/objects/index.js");
|
|
78057
|
+
const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
|
|
78058
|
+
const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
|
|
78059
|
+
class BDEFCheckSyntaxConf extends _basic_rule_config_1.BasicRuleConfig {
|
|
78060
|
+
}
|
|
78061
|
+
exports.BDEFCheckSyntaxConf = BDEFCheckSyntaxConf;
|
|
78062
|
+
class BDEFCheckSyntax {
|
|
78063
|
+
constructor() {
|
|
78064
|
+
this.conf = new BDEFCheckSyntaxConf();
|
|
78065
|
+
}
|
|
78066
|
+
getMetadata() {
|
|
78067
|
+
return {
|
|
78068
|
+
key: "bdef_check_syntax",
|
|
78069
|
+
title: "BDEF Check Syntax",
|
|
78070
|
+
shortDescription: "Checks behavior definition references to entities and implementation classes",
|
|
78071
|
+
extendedInformation: `Performs semantic checks which require other objects to be available.
|
|
78072
|
+
|
|
78073
|
+
Missing objects are only reported when their names match the configured errorNamespace.`,
|
|
78074
|
+
tags: [_irule_1.RuleTag.Syntax],
|
|
78075
|
+
};
|
|
78076
|
+
}
|
|
78077
|
+
getConfig() {
|
|
78078
|
+
return this.conf;
|
|
78079
|
+
}
|
|
78080
|
+
setConfig(conf) {
|
|
78081
|
+
this.conf = conf;
|
|
78082
|
+
}
|
|
78083
|
+
initialize(reg) {
|
|
78084
|
+
this.reg = reg;
|
|
78085
|
+
return this;
|
|
78086
|
+
}
|
|
78087
|
+
run(object) {
|
|
78088
|
+
if (!(object instanceof objects_1.BehaviorDefinition)) {
|
|
78089
|
+
return [];
|
|
78090
|
+
}
|
|
78091
|
+
const tree = object.getTree();
|
|
78092
|
+
const file = object.findSourceFile();
|
|
78093
|
+
if (tree === undefined || file === undefined) {
|
|
78094
|
+
return [];
|
|
78095
|
+
}
|
|
78096
|
+
const issues = [];
|
|
78097
|
+
this.checkImplementationClasses(tree, issues, file);
|
|
78098
|
+
this.checkEntities(tree, issues, file);
|
|
78099
|
+
return issues;
|
|
78100
|
+
}
|
|
78101
|
+
checkImplementationClasses(tree, issues, file) {
|
|
78102
|
+
for (const implementation of tree.findAllExpressions(expressions_1.BDEFImplementationIn)) {
|
|
78103
|
+
const nameNode = implementation.findDirectExpression(expressions_1.BDEFName);
|
|
78104
|
+
if (nameNode === undefined) {
|
|
78105
|
+
continue;
|
|
78106
|
+
}
|
|
78107
|
+
const name = this.name(nameNode);
|
|
78108
|
+
if (this.reg.getObject("CLAS", name) === undefined && this.reg.inErrorNamespace(name)) {
|
|
78109
|
+
issues.push(issue_1.Issue.atToken(file, nameNode.getFirstToken(), `Implementation class "${name}" not found`, this.getMetadata().key, this.conf.severity));
|
|
78110
|
+
}
|
|
78111
|
+
}
|
|
78112
|
+
}
|
|
78113
|
+
checkEntities(tree, issues, file) {
|
|
78114
|
+
const ddic = new ddic_1.DDIC(this.reg);
|
|
78115
|
+
for (const define of tree.findDirectExpressions(expressions_1.BDEFDefineBehavior)) {
|
|
78116
|
+
if (define.getFirstToken().getStr().toUpperCase() !== "DEFINE") {
|
|
78117
|
+
// "extend behavior for" refers to entities of the extended BDEF
|
|
78118
|
+
continue;
|
|
78119
|
+
}
|
|
78120
|
+
const nameNode = define.findDirectExpression(expressions_1.BDEFName);
|
|
78121
|
+
if (nameNode === undefined) {
|
|
78122
|
+
continue;
|
|
78123
|
+
}
|
|
78124
|
+
const name = this.name(nameNode);
|
|
78125
|
+
if (this.reg.inErrorNamespace(name)
|
|
78126
|
+
&& this.reg.getObject("DDLS", name) === undefined
|
|
78127
|
+
&& ddic.lookupDDLS(name) === undefined) {
|
|
78128
|
+
issues.push(issue_1.Issue.atToken(file, nameNode.getFirstToken(), `Entity "${name}" not found`, this.getMetadata().key, this.conf.severity));
|
|
78129
|
+
}
|
|
78130
|
+
}
|
|
78131
|
+
}
|
|
78132
|
+
name(node) {
|
|
78133
|
+
return node.concatTokens().replace(/ /g, "");
|
|
78134
|
+
}
|
|
78135
|
+
}
|
|
78136
|
+
exports.BDEFCheckSyntax = BDEFCheckSyntax;
|
|
78137
|
+
//# sourceMappingURL=bdef_check_syntax.js.map
|
|
78138
|
+
|
|
78139
|
+
/***/ },
|
|
78140
|
+
|
|
78141
|
+
/***/ "./node_modules/@abaplint/core/build/src/rules/bdef_parser_error.js"
|
|
78142
|
+
/*!**************************************************************************!*\
|
|
78143
|
+
!*** ./node_modules/@abaplint/core/build/src/rules/bdef_parser_error.js ***!
|
|
78144
|
+
\**************************************************************************/
|
|
78145
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
78146
|
+
|
|
78147
|
+
"use strict";
|
|
78148
|
+
|
|
78149
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
78150
|
+
exports.BDEFParserError = exports.BDEFParserErrorConf = void 0;
|
|
78151
|
+
const issue_1 = __webpack_require__(/*! ../issue */ "./node_modules/@abaplint/core/build/src/issue.js");
|
|
78152
|
+
const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
|
|
78153
|
+
const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
|
|
78154
|
+
const objects_1 = __webpack_require__(/*! ../objects */ "./node_modules/@abaplint/core/build/src/objects/index.js");
|
|
78155
|
+
class BDEFParserErrorConf extends _basic_rule_config_1.BasicRuleConfig {
|
|
78156
|
+
}
|
|
78157
|
+
exports.BDEFParserErrorConf = BDEFParserErrorConf;
|
|
78158
|
+
class BDEFParserError {
|
|
78159
|
+
constructor() {
|
|
78160
|
+
this.conf = new BDEFParserErrorConf();
|
|
78161
|
+
}
|
|
78162
|
+
getMetadata() {
|
|
78163
|
+
return {
|
|
78164
|
+
key: "bdef_parser_error",
|
|
78165
|
+
title: "BDEF Parser Error",
|
|
78166
|
+
shortDescription: `BDEF parsing`,
|
|
78167
|
+
extendedInformation: `Parses behavior definitions and issues parser errors`,
|
|
78168
|
+
tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.SingleFile],
|
|
78169
|
+
};
|
|
78170
|
+
}
|
|
78171
|
+
getConfig() {
|
|
78172
|
+
return this.conf;
|
|
78173
|
+
}
|
|
78174
|
+
setConfig(conf) {
|
|
78175
|
+
this.conf = conf;
|
|
78176
|
+
}
|
|
78177
|
+
initialize(_reg) {
|
|
78178
|
+
return this;
|
|
78179
|
+
}
|
|
78180
|
+
run(object) {
|
|
78181
|
+
const issues = [];
|
|
78182
|
+
if (object instanceof objects_1.BehaviorDefinition) {
|
|
78183
|
+
const file = object.findSourceFile();
|
|
78184
|
+
if (object.hasParserError() === true && file) {
|
|
78185
|
+
const empty = file.getRaw().length === 0 ? ", empty file" : "";
|
|
78186
|
+
const message = "BDEF Parser error" + empty;
|
|
78187
|
+
issues.push(issue_1.Issue.atRow(file, 1, message, this.getMetadata().key, this.getConfig().severity));
|
|
78188
|
+
}
|
|
78189
|
+
}
|
|
78190
|
+
return issues;
|
|
78191
|
+
}
|
|
78192
|
+
}
|
|
78193
|
+
exports.BDEFParserError = BDEFParserError;
|
|
78194
|
+
//# sourceMappingURL=bdef_parser_error.js.map
|
|
78195
|
+
|
|
78196
|
+
/***/ },
|
|
78197
|
+
|
|
76817
78198
|
/***/ "./node_modules/@abaplint/core/build/src/rules/begin_end_names.js"
|
|
76818
78199
|
/*!************************************************************************!*\
|
|
76819
78200
|
!*** ./node_modules/@abaplint/core/build/src/rules/begin_end_names.js ***!
|
|
@@ -91515,6 +92896,7 @@ __exportStar(__webpack_require__(/*! ./abapdoc */ "./node_modules/@abaplint/core
|
|
|
91515
92896
|
__exportStar(__webpack_require__(/*! ./abapdoc_html_tag */ "./node_modules/@abaplint/core/build/src/rules/abapdoc_html_tag.js"), exports);
|
|
91516
92897
|
__exportStar(__webpack_require__(/*! ./abapdoc_leading_at */ "./node_modules/@abaplint/core/build/src/rules/abapdoc_leading_at.js"), exports);
|
|
91517
92898
|
__exportStar(__webpack_require__(/*! ./abapdoc_parameter_names */ "./node_modules/@abaplint/core/build/src/rules/abapdoc_parameter_names.js"), exports);
|
|
92899
|
+
__exportStar(__webpack_require__(/*! ./abapdoc_shorttext_length */ "./node_modules/@abaplint/core/build/src/rules/abapdoc_shorttext_length.js"), exports);
|
|
91518
92900
|
__exportStar(__webpack_require__(/*! ./add_test_attributes */ "./node_modules/@abaplint/core/build/src/rules/add_test_attributes.js"), exports);
|
|
91519
92901
|
__exportStar(__webpack_require__(/*! ./aff_and_xml */ "./node_modules/@abaplint/core/build/src/rules/aff_and_xml.js"), exports);
|
|
91520
92902
|
__exportStar(__webpack_require__(/*! ./alias_never_reassigned */ "./node_modules/@abaplint/core/build/src/rules/alias_never_reassigned.js"), exports);
|
|
@@ -91525,6 +92907,8 @@ __exportStar(__webpack_require__(/*! ./allowed_object_naming */ "./node_modules/
|
|
|
91525
92907
|
__exportStar(__webpack_require__(/*! ./allowed_object_types */ "./node_modules/@abaplint/core/build/src/rules/allowed_object_types.js"), exports);
|
|
91526
92908
|
__exportStar(__webpack_require__(/*! ./ambiguous_statement */ "./node_modules/@abaplint/core/build/src/rules/ambiguous_statement.js"), exports);
|
|
91527
92909
|
__exportStar(__webpack_require__(/*! ./avoid_use */ "./node_modules/@abaplint/core/build/src/rules/avoid_use.js"), exports);
|
|
92910
|
+
__exportStar(__webpack_require__(/*! ./bdef_check_syntax */ "./node_modules/@abaplint/core/build/src/rules/bdef_check_syntax.js"), exports);
|
|
92911
|
+
__exportStar(__webpack_require__(/*! ./bdef_parser_error */ "./node_modules/@abaplint/core/build/src/rules/bdef_parser_error.js"), exports);
|
|
91528
92912
|
__exportStar(__webpack_require__(/*! ./begin_end_names */ "./node_modules/@abaplint/core/build/src/rules/begin_end_names.js"), exports);
|
|
91529
92913
|
__exportStar(__webpack_require__(/*! ./begin_single_include */ "./node_modules/@abaplint/core/build/src/rules/begin_single_include.js"), exports);
|
|
91530
92914
|
__exportStar(__webpack_require__(/*! ./boolean_flag_via_if */ "./node_modules/@abaplint/core/build/src/rules/boolean_flag_via_if.js"), exports);
|
|
@@ -91667,6 +93051,7 @@ __exportStar(__webpack_require__(/*! ./prefer_pragmas */ "./node_modules/@abapli
|
|
|
91667
93051
|
__exportStar(__webpack_require__(/*! ./prefer_abap_bool */ "./node_modules/@abaplint/core/build/src/rules/prefer_abap_bool.js"), exports);
|
|
91668
93052
|
__exportStar(__webpack_require__(/*! ./prefer_abap_bool_values */ "./node_modules/@abaplint/core/build/src/rules/prefer_abap_bool_values.js"), exports);
|
|
91669
93053
|
__exportStar(__webpack_require__(/*! ./prefer_raise_exception_new */ "./node_modules/@abaplint/core/build/src/rules/prefer_raise_exception_new.js"), exports);
|
|
93054
|
+
__exportStar(__webpack_require__(/*! ./prefer_raise_message */ "./node_modules/@abaplint/core/build/src/rules/prefer_raise_message.js"), exports);
|
|
91670
93055
|
__exportStar(__webpack_require__(/*! ./prefer_string_template */ "./node_modules/@abaplint/core/build/src/rules/prefer_string_template.js"), exports);
|
|
91671
93056
|
__exportStar(__webpack_require__(/*! ./prefer_returning_to_exporting */ "./node_modules/@abaplint/core/build/src/rules/prefer_returning_to_exporting.js"), exports);
|
|
91672
93057
|
__exportStar(__webpack_require__(/*! ./prefer_xsdbool */ "./node_modules/@abaplint/core/build/src/rules/prefer_xsdbool.js"), exports);
|
|
@@ -100798,40 +102183,269 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
100798
102183
|
};
|
|
100799
102184
|
})();
|
|
100800
102185
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
100801
|
-
exports.PreferIsNot = exports.PreferIsNotConf = void 0;
|
|
102186
|
+
exports.PreferIsNot = exports.PreferIsNotConf = void 0;
|
|
102187
|
+
const issue_1 = __webpack_require__(/*! ../issue */ "./node_modules/@abaplint/core/build/src/issue.js");
|
|
102188
|
+
const _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ "./node_modules/@abaplint/core/build/src/rules/_abap_rule.js");
|
|
102189
|
+
const Expressions = __importStar(__webpack_require__(/*! ../abap/2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js"));
|
|
102190
|
+
const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
|
|
102191
|
+
const edit_helper_1 = __webpack_require__(/*! ../edit_helper */ "./node_modules/@abaplint/core/build/src/edit_helper.js");
|
|
102192
|
+
const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
|
|
102193
|
+
const position_1 = __webpack_require__(/*! ../position */ "./node_modules/@abaplint/core/build/src/position.js");
|
|
102194
|
+
class PreferIsNotConf extends _basic_rule_config_1.BasicRuleConfig {
|
|
102195
|
+
}
|
|
102196
|
+
exports.PreferIsNotConf = PreferIsNotConf;
|
|
102197
|
+
class PreferIsNot extends _abap_rule_1.ABAPRule {
|
|
102198
|
+
constructor() {
|
|
102199
|
+
super(...arguments);
|
|
102200
|
+
this.conf = new PreferIsNotConf();
|
|
102201
|
+
}
|
|
102202
|
+
getMetadata() {
|
|
102203
|
+
return {
|
|
102204
|
+
key: "prefer_is_not",
|
|
102205
|
+
title: "Prefer IS NOT to NOT IS",
|
|
102206
|
+
shortDescription: `Prefer IS NOT to NOT IS`,
|
|
102207
|
+
extendedInformation: `
|
|
102208
|
+
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-is-not-to-not-is
|
|
102209
|
+
|
|
102210
|
+
"if not is_valid( )." examples are skipped`,
|
|
102211
|
+
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
|
|
102212
|
+
goodExample: `IF variable IS NOT INITIAL.
|
|
102213
|
+
IF variable NP 'TODO*'.
|
|
102214
|
+
IF variable <> 42.
|
|
102215
|
+
IF variable CO 'hello'.`,
|
|
102216
|
+
badExample: `IF NOT variable IS INITIAL.
|
|
102217
|
+
IF NOT variable CP 'TODO*'.
|
|
102218
|
+
IF NOT variable = 42.
|
|
102219
|
+
IF NOT variable CA 'hello'.`,
|
|
102220
|
+
};
|
|
102221
|
+
}
|
|
102222
|
+
getConfig() {
|
|
102223
|
+
return this.conf;
|
|
102224
|
+
}
|
|
102225
|
+
setConfig(conf) {
|
|
102226
|
+
this.conf = conf;
|
|
102227
|
+
}
|
|
102228
|
+
runParsed(file) {
|
|
102229
|
+
const issues = [];
|
|
102230
|
+
for (const s of file.getStatements()) {
|
|
102231
|
+
for (const c of s.findAllExpressions(Expressions.Compare)) {
|
|
102232
|
+
if (c.concatTokens().toUpperCase().startsWith("NOT ") === false) {
|
|
102233
|
+
continue;
|
|
102234
|
+
}
|
|
102235
|
+
else if (c.getChildren().length === 2 && c.getChildren()[1].get() instanceof Expressions.MethodCallChain) {
|
|
102236
|
+
continue;
|
|
102237
|
+
}
|
|
102238
|
+
const message = "Prefer IS NOT to NOT IS";
|
|
102239
|
+
const fix = this.getFix(file, c);
|
|
102240
|
+
issues.push(issue_1.Issue.atToken(file, c.getFirstToken(), message, this.getMetadata().key, this.conf.severity, fix));
|
|
102241
|
+
}
|
|
102242
|
+
}
|
|
102243
|
+
return issues;
|
|
102244
|
+
}
|
|
102245
|
+
getFix(file, c) {
|
|
102246
|
+
let insertFix;
|
|
102247
|
+
if (c.getChildren()[2].getFirstToken().getStr().toUpperCase() === "IS") {
|
|
102248
|
+
const tokenPositionBeforeDelete = c.getChildren()[2].getLastToken().getEnd();
|
|
102249
|
+
const tokenPosition = new position_1.Position(tokenPositionBeforeDelete.getRow(), tokenPositionBeforeDelete.getCol() + 1);
|
|
102250
|
+
insertFix = edit_helper_1.EditHelper.insertAt(file, tokenPosition, "NOT ");
|
|
102251
|
+
}
|
|
102252
|
+
else if (c.getChildren()[2].getFirstToken().getStr().toUpperCase() === "IN" || c.getChildren()[2].getFirstToken().getStr().toUpperCase() === "BETWEEN") {
|
|
102253
|
+
const tokenPositionBeforeDelete = c.getChildren()[1].getLastToken().getEnd();
|
|
102254
|
+
const tokenPosition = new position_1.Position(tokenPositionBeforeDelete.getRow(), tokenPositionBeforeDelete.getCol() + 1);
|
|
102255
|
+
insertFix = edit_helper_1.EditHelper.insertAt(file, tokenPosition, "NOT ");
|
|
102256
|
+
}
|
|
102257
|
+
else if (c.getChildren()[2].getFirstToken().getStr() === "=") {
|
|
102258
|
+
insertFix = edit_helper_1.EditHelper.replaceToken(file, c.getChildren()[2].getLastToken(), "<>");
|
|
102259
|
+
}
|
|
102260
|
+
else if (c.getChildren()[2].getFirstToken().getStr() === "<>") {
|
|
102261
|
+
insertFix = edit_helper_1.EditHelper.replaceToken(file, c.getChildren()[2].getLastToken(), "=");
|
|
102262
|
+
}
|
|
102263
|
+
else if (c.getChildren()[2].getFirstToken().getStr() === "<") {
|
|
102264
|
+
insertFix = edit_helper_1.EditHelper.replaceToken(file, c.getChildren()[2].getLastToken(), ">");
|
|
102265
|
+
}
|
|
102266
|
+
else if (c.getChildren()[2].getFirstToken().getStr() === ">") {
|
|
102267
|
+
insertFix = edit_helper_1.EditHelper.replaceToken(file, c.getChildren()[2].getLastToken(), "<");
|
|
102268
|
+
}
|
|
102269
|
+
else if (c.getChildren()[2].getFirstToken().getStr() === "<=") {
|
|
102270
|
+
insertFix = edit_helper_1.EditHelper.replaceToken(file, c.getChildren()[2].getLastToken(), ">=");
|
|
102271
|
+
}
|
|
102272
|
+
else if (c.getChildren()[2].getFirstToken().getStr() === ">=") {
|
|
102273
|
+
insertFix = edit_helper_1.EditHelper.replaceToken(file, c.getChildren()[2].getLastToken(), "<=");
|
|
102274
|
+
}
|
|
102275
|
+
else {
|
|
102276
|
+
return;
|
|
102277
|
+
}
|
|
102278
|
+
const endCol = c.getChildren()[0].getFirstToken().getEnd().getCol() + 1;
|
|
102279
|
+
const endPosition = new position_1.Position(c.getChildren()[0].getFirstToken().getEnd().getRow(), endCol);
|
|
102280
|
+
const deleteFix = edit_helper_1.EditHelper.deleteRange(file, c.getChildren()[0].getFirstToken().getStart(), endPosition);
|
|
102281
|
+
const finalFix = edit_helper_1.EditHelper.merge(insertFix, deleteFix);
|
|
102282
|
+
return finalFix;
|
|
102283
|
+
}
|
|
102284
|
+
}
|
|
102285
|
+
exports.PreferIsNot = PreferIsNot;
|
|
102286
|
+
//# sourceMappingURL=prefer_is_not.js.map
|
|
102287
|
+
|
|
102288
|
+
/***/ },
|
|
102289
|
+
|
|
102290
|
+
/***/ "./node_modules/@abaplint/core/build/src/rules/prefer_pragmas.js"
|
|
102291
|
+
/*!***********************************************************************!*\
|
|
102292
|
+
!*** ./node_modules/@abaplint/core/build/src/rules/prefer_pragmas.js ***!
|
|
102293
|
+
\***********************************************************************/
|
|
102294
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
102295
|
+
|
|
102296
|
+
"use strict";
|
|
102297
|
+
|
|
102298
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
102299
|
+
exports.PreferPragmas = exports.PreferPragmasConf = void 0;
|
|
102300
|
+
const issue_1 = __webpack_require__(/*! ../issue */ "./node_modules/@abaplint/core/build/src/issue.js");
|
|
102301
|
+
const _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ "./node_modules/@abaplint/core/build/src/rules/_abap_rule.js");
|
|
102302
|
+
const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
|
|
102303
|
+
const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
|
|
102304
|
+
const _statement_1 = __webpack_require__(/*! ../abap/2_statements/statements/_statement */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.js");
|
|
102305
|
+
class PreferPragmasConf extends _basic_rule_config_1.BasicRuleConfig {
|
|
102306
|
+
constructor() {
|
|
102307
|
+
super(...arguments);
|
|
102308
|
+
this.check = [
|
|
102309
|
+
{
|
|
102310
|
+
pseudo: "#EC CI_SUBRC",
|
|
102311
|
+
pragma: "SUBRC_OK",
|
|
102312
|
+
},
|
|
102313
|
+
{
|
|
102314
|
+
pseudo: "#EC NEEDED",
|
|
102315
|
+
pragma: "NEEDED",
|
|
102316
|
+
},
|
|
102317
|
+
{
|
|
102318
|
+
pseudo: "#EC NOTEXT",
|
|
102319
|
+
pragma: "NO_TEXT",
|
|
102320
|
+
},
|
|
102321
|
+
{
|
|
102322
|
+
pseudo: "#EC NO_HANDLER",
|
|
102323
|
+
pragma: "NO_HANDLER",
|
|
102324
|
+
},
|
|
102325
|
+
];
|
|
102326
|
+
}
|
|
102327
|
+
}
|
|
102328
|
+
exports.PreferPragmasConf = PreferPragmasConf;
|
|
102329
|
+
class PreferPragmas extends _abap_rule_1.ABAPRule {
|
|
102330
|
+
constructor() {
|
|
102331
|
+
super(...arguments);
|
|
102332
|
+
this.conf = new PreferPragmasConf();
|
|
102333
|
+
}
|
|
102334
|
+
getMetadata() {
|
|
102335
|
+
return {
|
|
102336
|
+
key: "prefer_pragmas",
|
|
102337
|
+
title: "prefer pragmas over pseudo comments ",
|
|
102338
|
+
shortDescription: `prefer pragmas over pseudo comments`,
|
|
102339
|
+
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-pragmas-to-pseudo-comments`,
|
|
102340
|
+
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
|
|
102341
|
+
badExample: `DATA foo1 TYPE i. "#EC NEEDED`,
|
|
102342
|
+
goodExample: `DATA foo2 TYPE i ##NEEDED.`,
|
|
102343
|
+
};
|
|
102344
|
+
}
|
|
102345
|
+
getConfig() {
|
|
102346
|
+
return this.conf;
|
|
102347
|
+
}
|
|
102348
|
+
setConfig(conf) {
|
|
102349
|
+
this.conf = conf;
|
|
102350
|
+
}
|
|
102351
|
+
runParsed(file) {
|
|
102352
|
+
const issues = [];
|
|
102353
|
+
const config = this.getConfig();
|
|
102354
|
+
for (const statement of file.getStatements()) {
|
|
102355
|
+
if (!(statement.get() instanceof _statement_1.Comment)) {
|
|
102356
|
+
continue;
|
|
102357
|
+
}
|
|
102358
|
+
const concat = statement.concatTokens().toUpperCase();
|
|
102359
|
+
if (concat.includes("#EC") === false) {
|
|
102360
|
+
continue;
|
|
102361
|
+
}
|
|
102362
|
+
for (const check of config.check) {
|
|
102363
|
+
if (concat.includes(check.pseudo.toUpperCase())) {
|
|
102364
|
+
const message = `Prefer pragma ${check.pragma}`;
|
|
102365
|
+
issues.push(issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.getConfig().severity));
|
|
102366
|
+
}
|
|
102367
|
+
}
|
|
102368
|
+
}
|
|
102369
|
+
return issues;
|
|
102370
|
+
}
|
|
102371
|
+
}
|
|
102372
|
+
exports.PreferPragmas = PreferPragmas;
|
|
102373
|
+
//# sourceMappingURL=prefer_pragmas.js.map
|
|
102374
|
+
|
|
102375
|
+
/***/ },
|
|
102376
|
+
|
|
102377
|
+
/***/ "./node_modules/@abaplint/core/build/src/rules/prefer_raise_exception_new.js"
|
|
102378
|
+
/*!***********************************************************************************!*\
|
|
102379
|
+
!*** ./node_modules/@abaplint/core/build/src/rules/prefer_raise_exception_new.js ***!
|
|
102380
|
+
\***********************************************************************************/
|
|
102381
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
102382
|
+
|
|
102383
|
+
"use strict";
|
|
102384
|
+
|
|
102385
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
102386
|
+
if (k2 === undefined) k2 = k;
|
|
102387
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
102388
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
102389
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
102390
|
+
}
|
|
102391
|
+
Object.defineProperty(o, k2, desc);
|
|
102392
|
+
}) : (function(o, m, k, k2) {
|
|
102393
|
+
if (k2 === undefined) k2 = k;
|
|
102394
|
+
o[k2] = m[k];
|
|
102395
|
+
}));
|
|
102396
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
102397
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
102398
|
+
}) : function(o, v) {
|
|
102399
|
+
o["default"] = v;
|
|
102400
|
+
});
|
|
102401
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
102402
|
+
var ownKeys = function(o) {
|
|
102403
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
102404
|
+
var ar = [];
|
|
102405
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
102406
|
+
return ar;
|
|
102407
|
+
};
|
|
102408
|
+
return ownKeys(o);
|
|
102409
|
+
};
|
|
102410
|
+
return function (mod) {
|
|
102411
|
+
if (mod && mod.__esModule) return mod;
|
|
102412
|
+
var result = {};
|
|
102413
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
102414
|
+
__setModuleDefault(result, mod);
|
|
102415
|
+
return result;
|
|
102416
|
+
};
|
|
102417
|
+
})();
|
|
102418
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
102419
|
+
exports.PreferRaiseExceptionNew = exports.PreferRaiseExceptionNewConf = void 0;
|
|
100802
102420
|
const issue_1 = __webpack_require__(/*! ../issue */ "./node_modules/@abaplint/core/build/src/issue.js");
|
|
100803
102421
|
const _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ "./node_modules/@abaplint/core/build/src/rules/_abap_rule.js");
|
|
100804
|
-
const Expressions = __importStar(__webpack_require__(/*! ../abap/2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js"));
|
|
100805
102422
|
const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
|
|
100806
102423
|
const edit_helper_1 = __webpack_require__(/*! ../edit_helper */ "./node_modules/@abaplint/core/build/src/edit_helper.js");
|
|
100807
102424
|
const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
|
|
100808
|
-
const
|
|
100809
|
-
|
|
102425
|
+
const version_1 = __webpack_require__(/*! ../version */ "./node_modules/@abaplint/core/build/src/version.js");
|
|
102426
|
+
const Statements = __importStar(__webpack_require__(/*! ../abap/2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js"));
|
|
102427
|
+
class PreferRaiseExceptionNewConf extends _basic_rule_config_1.BasicRuleConfig {
|
|
100810
102428
|
}
|
|
100811
|
-
exports.
|
|
100812
|
-
class
|
|
102429
|
+
exports.PreferRaiseExceptionNewConf = PreferRaiseExceptionNewConf;
|
|
102430
|
+
class PreferRaiseExceptionNew extends _abap_rule_1.ABAPRule {
|
|
100813
102431
|
constructor() {
|
|
100814
102432
|
super(...arguments);
|
|
100815
|
-
this.conf = new
|
|
102433
|
+
this.conf = new PreferRaiseExceptionNewConf();
|
|
100816
102434
|
}
|
|
100817
102435
|
getMetadata() {
|
|
100818
102436
|
return {
|
|
100819
|
-
key: "
|
|
100820
|
-
title: "Prefer
|
|
100821
|
-
shortDescription: `Prefer
|
|
102437
|
+
key: "prefer_raise_exception_new",
|
|
102438
|
+
title: "Prefer RAISE EXCEPTION NEW to RAISE EXCEPTION TYPE",
|
|
102439
|
+
shortDescription: `Prefer RAISE EXCEPTION NEW to RAISE EXCEPTION TYPE`,
|
|
100822
102440
|
extendedInformation: `
|
|
100823
|
-
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-
|
|
102441
|
+
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-raise-exception-new-to-raise-exception-type
|
|
100824
102442
|
|
|
100825
|
-
|
|
100826
|
-
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.
|
|
100827
|
-
goodExample: `
|
|
100828
|
-
|
|
100829
|
-
|
|
100830
|
-
|
|
100831
|
-
badExample: `IF NOT variable IS INITIAL.
|
|
100832
|
-
IF NOT variable CP 'TODO*'.
|
|
100833
|
-
IF NOT variable = 42.
|
|
100834
|
-
IF NOT variable CA 'hello'.`,
|
|
102443
|
+
From 752 and up`,
|
|
102444
|
+
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Upport],
|
|
102445
|
+
goodExample: `RAISE EXCEPTION NEW cx_generation_error( previous = exception ).`,
|
|
102446
|
+
badExample: `RAISE EXCEPTION TYPE cx_generation_error
|
|
102447
|
+
EXPORTING
|
|
102448
|
+
previous = exception.`,
|
|
100835
102449
|
};
|
|
100836
102450
|
}
|
|
100837
102451
|
getConfig() {
|
|
@@ -100841,158 +102455,42 @@ IF NOT variable CA 'hello'.`,
|
|
|
100841
102455
|
this.conf = conf;
|
|
100842
102456
|
}
|
|
100843
102457
|
runParsed(file) {
|
|
102458
|
+
if (!(0, version_1.releaseAtLeast)(this.reg.getConfig().getRelease(), version_1.Release.v752)) {
|
|
102459
|
+
return [];
|
|
102460
|
+
}
|
|
100844
102461
|
const issues = [];
|
|
100845
|
-
for (const
|
|
100846
|
-
|
|
100847
|
-
|
|
102462
|
+
for (const statement of file.getStatements()) {
|
|
102463
|
+
if (statement.get() instanceof Statements.Raise) {
|
|
102464
|
+
const concat = statement.concatTokens().toUpperCase();
|
|
102465
|
+
if (concat.includes(" MESSAGE")) {
|
|
100848
102466
|
continue;
|
|
100849
102467
|
}
|
|
100850
|
-
|
|
100851
|
-
|
|
102468
|
+
if (concat.startsWith("RAISE EXCEPTION TYPE ")) {
|
|
102469
|
+
const message = "Prefer RAISE EXCEPTION NEW to RAISE EXCEPTION TYPE";
|
|
102470
|
+
const fix = this.getFix(file, statement, concat.includes(" EXPORTING") ? true : false);
|
|
102471
|
+
issues.push(issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity, fix));
|
|
100852
102472
|
}
|
|
100853
|
-
const message = "Prefer IS NOT to NOT IS";
|
|
100854
|
-
const fix = this.getFix(file, c);
|
|
100855
|
-
issues.push(issue_1.Issue.atToken(file, c.getFirstToken(), message, this.getMetadata().key, this.conf.severity, fix));
|
|
100856
102473
|
}
|
|
100857
102474
|
}
|
|
100858
102475
|
return issues;
|
|
100859
102476
|
}
|
|
100860
|
-
getFix(file,
|
|
100861
|
-
|
|
100862
|
-
|
|
100863
|
-
|
|
100864
|
-
|
|
100865
|
-
|
|
100866
|
-
}
|
|
100867
|
-
else if (c.getChildren()[2].getFirstToken().getStr().toUpperCase() === "IN" || c.getChildren()[2].getFirstToken().getStr().toUpperCase() === "BETWEEN") {
|
|
100868
|
-
const tokenPositionBeforeDelete = c.getChildren()[1].getLastToken().getEnd();
|
|
100869
|
-
const tokenPosition = new position_1.Position(tokenPositionBeforeDelete.getRow(), tokenPositionBeforeDelete.getCol() + 1);
|
|
100870
|
-
insertFix = edit_helper_1.EditHelper.insertAt(file, tokenPosition, "NOT ");
|
|
100871
|
-
}
|
|
100872
|
-
else if (c.getChildren()[2].getFirstToken().getStr() === "=") {
|
|
100873
|
-
insertFix = edit_helper_1.EditHelper.replaceToken(file, c.getChildren()[2].getLastToken(), "<>");
|
|
100874
|
-
}
|
|
100875
|
-
else if (c.getChildren()[2].getFirstToken().getStr() === "<>") {
|
|
100876
|
-
insertFix = edit_helper_1.EditHelper.replaceToken(file, c.getChildren()[2].getLastToken(), "=");
|
|
100877
|
-
}
|
|
100878
|
-
else if (c.getChildren()[2].getFirstToken().getStr() === "<") {
|
|
100879
|
-
insertFix = edit_helper_1.EditHelper.replaceToken(file, c.getChildren()[2].getLastToken(), ">");
|
|
100880
|
-
}
|
|
100881
|
-
else if (c.getChildren()[2].getFirstToken().getStr() === ">") {
|
|
100882
|
-
insertFix = edit_helper_1.EditHelper.replaceToken(file, c.getChildren()[2].getLastToken(), "<");
|
|
100883
|
-
}
|
|
100884
|
-
else if (c.getChildren()[2].getFirstToken().getStr() === "<=") {
|
|
100885
|
-
insertFix = edit_helper_1.EditHelper.replaceToken(file, c.getChildren()[2].getLastToken(), ">=");
|
|
100886
|
-
}
|
|
100887
|
-
else if (c.getChildren()[2].getFirstToken().getStr() === ">=") {
|
|
100888
|
-
insertFix = edit_helper_1.EditHelper.replaceToken(file, c.getChildren()[2].getLastToken(), "<=");
|
|
100889
|
-
}
|
|
100890
|
-
else {
|
|
100891
|
-
return;
|
|
100892
|
-
}
|
|
100893
|
-
const endCol = c.getChildren()[0].getFirstToken().getEnd().getCol() + 1;
|
|
100894
|
-
const endPosition = new position_1.Position(c.getChildren()[0].getFirstToken().getEnd().getRow(), endCol);
|
|
100895
|
-
const deleteFix = edit_helper_1.EditHelper.deleteRange(file, c.getChildren()[0].getFirstToken().getStart(), endPosition);
|
|
100896
|
-
const finalFix = edit_helper_1.EditHelper.merge(insertFix, deleteFix);
|
|
100897
|
-
return finalFix;
|
|
100898
|
-
}
|
|
100899
|
-
}
|
|
100900
|
-
exports.PreferIsNot = PreferIsNot;
|
|
100901
|
-
//# sourceMappingURL=prefer_is_not.js.map
|
|
100902
|
-
|
|
100903
|
-
/***/ },
|
|
100904
|
-
|
|
100905
|
-
/***/ "./node_modules/@abaplint/core/build/src/rules/prefer_pragmas.js"
|
|
100906
|
-
/*!***********************************************************************!*\
|
|
100907
|
-
!*** ./node_modules/@abaplint/core/build/src/rules/prefer_pragmas.js ***!
|
|
100908
|
-
\***********************************************************************/
|
|
100909
|
-
(__unused_webpack_module, exports, __webpack_require__) {
|
|
100910
|
-
|
|
100911
|
-
"use strict";
|
|
100912
|
-
|
|
100913
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
100914
|
-
exports.PreferPragmas = exports.PreferPragmasConf = void 0;
|
|
100915
|
-
const issue_1 = __webpack_require__(/*! ../issue */ "./node_modules/@abaplint/core/build/src/issue.js");
|
|
100916
|
-
const _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ "./node_modules/@abaplint/core/build/src/rules/_abap_rule.js");
|
|
100917
|
-
const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
|
|
100918
|
-
const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
|
|
100919
|
-
const _statement_1 = __webpack_require__(/*! ../abap/2_statements/statements/_statement */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.js");
|
|
100920
|
-
class PreferPragmasConf extends _basic_rule_config_1.BasicRuleConfig {
|
|
100921
|
-
constructor() {
|
|
100922
|
-
super(...arguments);
|
|
100923
|
-
this.check = [
|
|
100924
|
-
{
|
|
100925
|
-
pseudo: "#EC CI_SUBRC",
|
|
100926
|
-
pragma: "SUBRC_OK",
|
|
100927
|
-
},
|
|
100928
|
-
{
|
|
100929
|
-
pseudo: "#EC NEEDED",
|
|
100930
|
-
pragma: "NEEDED",
|
|
100931
|
-
},
|
|
100932
|
-
{
|
|
100933
|
-
pseudo: "#EC NOTEXT",
|
|
100934
|
-
pragma: "NO_TEXT",
|
|
100935
|
-
},
|
|
100936
|
-
{
|
|
100937
|
-
pseudo: "#EC NO_HANDLER",
|
|
100938
|
-
pragma: "NO_HANDLER",
|
|
100939
|
-
},
|
|
100940
|
-
];
|
|
100941
|
-
}
|
|
100942
|
-
}
|
|
100943
|
-
exports.PreferPragmasConf = PreferPragmasConf;
|
|
100944
|
-
class PreferPragmas extends _abap_rule_1.ABAPRule {
|
|
100945
|
-
constructor() {
|
|
100946
|
-
super(...arguments);
|
|
100947
|
-
this.conf = new PreferPragmasConf();
|
|
100948
|
-
}
|
|
100949
|
-
getMetadata() {
|
|
100950
|
-
return {
|
|
100951
|
-
key: "prefer_pragmas",
|
|
100952
|
-
title: "prefer pragmas over pseudo comments ",
|
|
100953
|
-
shortDescription: `prefer pragmas over pseudo comments`,
|
|
100954
|
-
extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-pragmas-to-pseudo-comments`,
|
|
100955
|
-
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
|
|
100956
|
-
badExample: `DATA foo1 TYPE i. "#EC NEEDED`,
|
|
100957
|
-
goodExample: `DATA foo2 TYPE i ##NEEDED.`,
|
|
100958
|
-
};
|
|
100959
|
-
}
|
|
100960
|
-
getConfig() {
|
|
100961
|
-
return this.conf;
|
|
100962
|
-
}
|
|
100963
|
-
setConfig(conf) {
|
|
100964
|
-
this.conf = conf;
|
|
100965
|
-
}
|
|
100966
|
-
runParsed(file) {
|
|
100967
|
-
const issues = [];
|
|
100968
|
-
const config = this.getConfig();
|
|
100969
|
-
for (const statement of file.getStatements()) {
|
|
100970
|
-
if (!(statement.get() instanceof _statement_1.Comment)) {
|
|
100971
|
-
continue;
|
|
100972
|
-
}
|
|
100973
|
-
const concat = statement.concatTokens().toUpperCase();
|
|
100974
|
-
if (concat.includes("#EC") === false) {
|
|
100975
|
-
continue;
|
|
100976
|
-
}
|
|
100977
|
-
for (const check of config.check) {
|
|
100978
|
-
if (concat.includes(check.pseudo.toUpperCase())) {
|
|
100979
|
-
const message = `Prefer pragma ${check.pragma}`;
|
|
100980
|
-
issues.push(issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.getConfig().severity));
|
|
100981
|
-
}
|
|
100982
|
-
}
|
|
100983
|
-
}
|
|
100984
|
-
return issues;
|
|
102477
|
+
getFix(file, statement, withExporting) {
|
|
102478
|
+
const children = statement.getChildren();
|
|
102479
|
+
const fixText = withExporting ? "( " + children[5].concatTokens() + " )." : "( ).";
|
|
102480
|
+
const contentFix = edit_helper_1.EditHelper.replaceRange(file, children[3].getLastToken().getEnd(), statement.getEnd(), fixText);
|
|
102481
|
+
const replaceType = edit_helper_1.EditHelper.replaceToken(file, children[2].getFirstToken(), "NEW");
|
|
102482
|
+
return edit_helper_1.EditHelper.merge(contentFix, replaceType);
|
|
100985
102483
|
}
|
|
100986
102484
|
}
|
|
100987
|
-
exports.
|
|
100988
|
-
//# sourceMappingURL=
|
|
102485
|
+
exports.PreferRaiseExceptionNew = PreferRaiseExceptionNew;
|
|
102486
|
+
//# sourceMappingURL=prefer_raise_exception_new.js.map
|
|
100989
102487
|
|
|
100990
102488
|
/***/ },
|
|
100991
102489
|
|
|
100992
|
-
/***/ "./node_modules/@abaplint/core/build/src/rules/
|
|
100993
|
-
|
|
100994
|
-
!*** ./node_modules/@abaplint/core/build/src/rules/
|
|
100995
|
-
|
|
102490
|
+
/***/ "./node_modules/@abaplint/core/build/src/rules/prefer_raise_message.js"
|
|
102491
|
+
/*!*****************************************************************************!*\
|
|
102492
|
+
!*** ./node_modules/@abaplint/core/build/src/rules/prefer_raise_message.js ***!
|
|
102493
|
+
\*****************************************************************************/
|
|
100996
102494
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
100997
102495
|
|
|
100998
102496
|
"use strict";
|
|
@@ -101031,36 +102529,40 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
101031
102529
|
};
|
|
101032
102530
|
})();
|
|
101033
102531
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
101034
|
-
exports.
|
|
102532
|
+
exports.PreferRaiseMessage = exports.PreferRaiseMessageConf = void 0;
|
|
101035
102533
|
const issue_1 = __webpack_require__(/*! ../issue */ "./node_modules/@abaplint/core/build/src/issue.js");
|
|
101036
102534
|
const _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ "./node_modules/@abaplint/core/build/src/rules/_abap_rule.js");
|
|
101037
102535
|
const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
|
|
101038
|
-
const edit_helper_1 = __webpack_require__(/*! ../edit_helper */ "./node_modules/@abaplint/core/build/src/edit_helper.js");
|
|
101039
102536
|
const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
|
|
101040
|
-
const version_1 = __webpack_require__(/*! ../version */ "./node_modules/@abaplint/core/build/src/version.js");
|
|
101041
102537
|
const Statements = __importStar(__webpack_require__(/*! ../abap/2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js"));
|
|
101042
|
-
|
|
102538
|
+
const Expressions = __importStar(__webpack_require__(/*! ../abap/2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js"));
|
|
102539
|
+
class PreferRaiseMessageConf extends _basic_rule_config_1.BasicRuleConfig {
|
|
102540
|
+
constructor() {
|
|
102541
|
+
super(...arguments);
|
|
102542
|
+
/** List of exception class names to ignore, case insensitive */
|
|
102543
|
+
this.ignoreExceptionClasses = [];
|
|
102544
|
+
}
|
|
101043
102545
|
}
|
|
101044
|
-
exports.
|
|
101045
|
-
class
|
|
102546
|
+
exports.PreferRaiseMessageConf = PreferRaiseMessageConf;
|
|
102547
|
+
class PreferRaiseMessage extends _abap_rule_1.ABAPRule {
|
|
101046
102548
|
constructor() {
|
|
101047
102549
|
super(...arguments);
|
|
101048
|
-
this.conf = new
|
|
102550
|
+
this.conf = new PreferRaiseMessageConf();
|
|
101049
102551
|
}
|
|
101050
102552
|
getMetadata() {
|
|
101051
102553
|
return {
|
|
101052
|
-
key: "
|
|
101053
|
-
title: "Prefer RAISE EXCEPTION
|
|
101054
|
-
shortDescription: `Prefer RAISE EXCEPTION
|
|
101055
|
-
extendedInformation: `
|
|
101056
|
-
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-raise-exception-new-to-raise-exception-type
|
|
102554
|
+
key: "prefer_raise_message",
|
|
102555
|
+
title: "Prefer RAISE EXCEPTION with MESSAGE",
|
|
102556
|
+
shortDescription: `Prefer RAISE EXCEPTION with MESSAGE instead of supplying parameter TEXT or TEXTID`,
|
|
102557
|
+
extendedInformation: `Reports RAISE EXCEPTION statements where parameter TEXT or TEXTID is supplied.
|
|
101057
102558
|
|
|
101058
|
-
|
|
101059
|
-
|
|
101060
|
-
|
|
101061
|
-
|
|
101062
|
-
|
|
101063
|
-
|
|
102559
|
+
Use a message class instead, so the text is translatable and can be found via where-used.
|
|
102560
|
+
|
|
102561
|
+
Exception classes can be excluded via configuration "ignoreExceptionClasses".`,
|
|
102562
|
+
tags: [_irule_1.RuleTag.SingleFile],
|
|
102563
|
+
goodExample: `RAISE EXCEPTION TYPE zcx_error MESSAGE e001(zclass).`,
|
|
102564
|
+
badExample: `RAISE EXCEPTION TYPE zcx_error
|
|
102565
|
+
EXPORTING text = 'hello world'.`,
|
|
101064
102566
|
};
|
|
101065
102567
|
}
|
|
101066
102568
|
getConfig() {
|
|
@@ -101070,35 +102572,46 @@ From 752 and up`,
|
|
|
101070
102572
|
this.conf = conf;
|
|
101071
102573
|
}
|
|
101072
102574
|
runParsed(file) {
|
|
101073
|
-
|
|
101074
|
-
|
|
101075
|
-
}
|
|
102575
|
+
var _a, _b, _c, _d;
|
|
102576
|
+
var _e;
|
|
101076
102577
|
const issues = [];
|
|
102578
|
+
const ignore = ((_e = this.conf.ignoreExceptionClasses) !== null && _e !== void 0 ? _e : []).map(c => c.toUpperCase());
|
|
101077
102579
|
for (const statement of file.getStatements()) {
|
|
101078
|
-
if (statement.get() instanceof Statements.Raise) {
|
|
101079
|
-
|
|
101080
|
-
|
|
101081
|
-
|
|
101082
|
-
|
|
101083
|
-
|
|
101084
|
-
|
|
101085
|
-
|
|
101086
|
-
|
|
101087
|
-
|
|
102580
|
+
if (!(statement.get() instanceof Statements.Raise)) {
|
|
102581
|
+
continue;
|
|
102582
|
+
}
|
|
102583
|
+
const concat = statement.concatTokens().toUpperCase();
|
|
102584
|
+
if (!concat.startsWith("RAISE EXCEPTION ") && !concat.startsWith("RAISE RESUMABLE EXCEPTION ")) {
|
|
102585
|
+
continue;
|
|
102586
|
+
}
|
|
102587
|
+
else if (concat.includes(" MESSAGE")) {
|
|
102588
|
+
continue;
|
|
102589
|
+
}
|
|
102590
|
+
let className;
|
|
102591
|
+
let parameters;
|
|
102592
|
+
const newObject = (_b = (_a = statement.findDirectExpression(Expressions.Source)) === null || _a === void 0 ? void 0 : _a.findDirectExpression(Expressions.MethodCallChain)) === null || _b === void 0 ? void 0 : _b.findDirectExpression(Expressions.NewObject);
|
|
102593
|
+
if (newObject) {
|
|
102594
|
+
className = (_c = newObject.findDirectExpression(Expressions.TypeNameOrInfer)) === null || _c === void 0 ? void 0 : _c.concatTokens();
|
|
102595
|
+
parameters = newObject.findDirectExpression(Expressions.ParameterListS);
|
|
102596
|
+
}
|
|
102597
|
+
else {
|
|
102598
|
+
className = (_d = statement.findDirectExpression(Expressions.ClassName)) === null || _d === void 0 ? void 0 : _d.concatTokens();
|
|
102599
|
+
parameters = statement.findDirectExpression(Expressions.ParameterListS);
|
|
102600
|
+
}
|
|
102601
|
+
if (className === undefined || ignore.includes(className.toUpperCase())) {
|
|
102602
|
+
continue;
|
|
102603
|
+
}
|
|
102604
|
+
const name = parameters === null || parameters === void 0 ? void 0 : parameters.findDirectExpressions(Expressions.ParameterS).map(p => { var _a; return (_a = p.findDirectExpression(Expressions.ParameterName)) === null || _a === void 0 ? void 0 : _a.concatTokens().toUpperCase(); }).find(n => n === "TEXT" || n === "TEXTID");
|
|
102605
|
+
if (name) {
|
|
102606
|
+
const message = "Prefer RAISE EXCEPTION with MESSAGE, " + className + " raised with parameter " + name;
|
|
102607
|
+
issues.push(issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity));
|
|
101088
102608
|
}
|
|
101089
102609
|
}
|
|
101090
102610
|
return issues;
|
|
101091
102611
|
}
|
|
101092
|
-
getFix(file, statement, withExporting) {
|
|
101093
|
-
const children = statement.getChildren();
|
|
101094
|
-
const fixText = withExporting ? "( " + children[5].concatTokens() + " )." : "( ).";
|
|
101095
|
-
const contentFix = edit_helper_1.EditHelper.replaceRange(file, children[3].getLastToken().getEnd(), statement.getEnd(), fixText);
|
|
101096
|
-
const replaceType = edit_helper_1.EditHelper.replaceToken(file, children[2].getFirstToken(), "NEW");
|
|
101097
|
-
return edit_helper_1.EditHelper.merge(contentFix, replaceType);
|
|
101098
|
-
}
|
|
101099
102612
|
}
|
|
101100
|
-
exports.
|
|
101101
|
-
//# sourceMappingURL=
|
|
102613
|
+
exports.PreferRaiseMessage = PreferRaiseMessage;
|
|
102614
|
+
//# sourceMappingURL=prefer_raise_message.js.map
|
|
101102
102615
|
|
|
101103
102616
|
/***/ },
|
|
101104
102617
|
|
|
@@ -126437,11 +127950,33 @@ class FieldSymbolTranspiler {
|
|
|
126437
127950
|
if (found === undefined) {
|
|
126438
127951
|
throw new Error("FieldSymbolTranspiler, var not found, \"" + token.getStr() + "\"");
|
|
126439
127952
|
}
|
|
127953
|
+
let type = found.getType();
|
|
127954
|
+
// abaplint types TYPE STANDARD TABLE, SORTED TABLE, HASHED TABLE, INDEX TABLE and
|
|
127955
|
+
// ANY TABLE alike, a generic table without a primary key; the kind is in the statement,
|
|
127956
|
+
// and the runtime needs it to refuse an ASSIGN of a table of another kind
|
|
127957
|
+
const typeTable = node.findDirectExpression(abaplint.Expressions.TypeTable);
|
|
127958
|
+
if (typeTable !== undefined
|
|
127959
|
+
&& type instanceof abaplint.BasicTypes.TableType
|
|
127960
|
+
&& type.getOptions().primaryKey === undefined) {
|
|
127961
|
+
const kind = /^TYPE (STANDARD|SORTED|HASHED|INDEX|ANY) TABLE$/i.exec(typeTable.concatTokens());
|
|
127962
|
+
if (kind !== null) {
|
|
127963
|
+
const options = {
|
|
127964
|
+
...type.getOptions(),
|
|
127965
|
+
primaryKey: {
|
|
127966
|
+
name: "primary_key",
|
|
127967
|
+
type: kind[1].toUpperCase(),
|
|
127968
|
+
keyFields: [],
|
|
127969
|
+
isUnique: false,
|
|
127970
|
+
},
|
|
127971
|
+
};
|
|
127972
|
+
type = new abaplint.BasicTypes.TableType(type.getRowType(), options, type.getQualifiedName());
|
|
127973
|
+
}
|
|
127974
|
+
}
|
|
126440
127975
|
if (name) {
|
|
126441
127976
|
return new chunk_1.Chunk()
|
|
126442
127977
|
.appendString("let ")
|
|
126443
127978
|
.appendString(new field_symbol_1.FieldSymbolTranspiler().transpile(name, traversal).getCode())
|
|
126444
|
-
.appendString(" = new abap.types.FieldSymbol(" + traversal.toType(
|
|
127979
|
+
.appendString(" = new abap.types.FieldSymbol(" + traversal.toType(type) + ");");
|
|
126445
127980
|
}
|
|
126446
127981
|
throw new Error("FieldSymbolTranspiler, name not found");
|
|
126447
127982
|
}
|