@abaplint/transpiler-cli 2.12.24 → 2.12.25
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 +217 -42
- package/package.json +4 -4
package/build/bundle.js
CHANGED
|
@@ -22209,8 +22209,25 @@ class Procedural {
|
|
|
22209
22209
|
}
|
|
22210
22210
|
return undefined;
|
|
22211
22211
|
}
|
|
22212
|
+
findFunctionGroupScope(fg) {
|
|
22213
|
+
var _a, _b, _c;
|
|
22214
|
+
for (const module of fg.getModules()) {
|
|
22215
|
+
if (module.isGlobalParameters() === false) {
|
|
22216
|
+
continue;
|
|
22217
|
+
}
|
|
22218
|
+
// console.dir(fg.getSequencedFiles());
|
|
22219
|
+
const fmFile = fg.getSequencedFiles().find((f) => { return f.getFilename().endsWith(".fugr." + module.getName().toLowerCase().replace(/\//g, "#") + ".abap"); });
|
|
22220
|
+
if (fmFile === undefined) {
|
|
22221
|
+
continue;
|
|
22222
|
+
}
|
|
22223
|
+
const nameToken = (_c = (_b = (_a = fmFile.getStructure()) === null || _a === void 0 ? void 0 : _a.findFirstStatement(Statements.FunctionModule)) === null || _b === void 0 ? void 0 : _b.findFirstExpression(Expressions.Field)) === null || _c === void 0 ? void 0 : _c.getFirstToken();
|
|
22224
|
+
if (nameToken === undefined) {
|
|
22225
|
+
continue;
|
|
22226
|
+
}
|
|
22227
|
+
this.addFunctionScope(module, nameToken, fmFile.getFilename(), true);
|
|
22228
|
+
}
|
|
22229
|
+
}
|
|
22212
22230
|
findFunctionScope(obj, node, filename) {
|
|
22213
|
-
var _a, _b, _c, _d, _e;
|
|
22214
22231
|
if (!(obj instanceof objects_1.FunctionGroup)) {
|
|
22215
22232
|
throw new Error("findFunctionScope, expected function group input");
|
|
22216
22233
|
}
|
|
@@ -22221,6 +22238,13 @@ class Procedural {
|
|
|
22221
22238
|
if (definition === undefined) {
|
|
22222
22239
|
throw new Error("Function module definition \"" + name + "\" not found");
|
|
22223
22240
|
}
|
|
22241
|
+
if (definition.isGlobalParameters() === true) {
|
|
22242
|
+
return; // already added at global level
|
|
22243
|
+
}
|
|
22244
|
+
this.addFunctionScope(definition, nameToken, filename);
|
|
22245
|
+
}
|
|
22246
|
+
addFunctionScope(definition, nameToken, filename, ignoreIfAlreadyExists = false) {
|
|
22247
|
+
var _a, _b, _c, _d, _e;
|
|
22224
22248
|
const ddic = new ddic_1.DDIC(this.reg);
|
|
22225
22249
|
const allNames = new Set();
|
|
22226
22250
|
for (const param of definition.getParameters()) {
|
|
@@ -22306,7 +22330,15 @@ class Procedural {
|
|
|
22306
22330
|
}
|
|
22307
22331
|
else {
|
|
22308
22332
|
const type = new _typed_identifier_1.TypedIdentifier(nameToken, filename, found);
|
|
22309
|
-
|
|
22333
|
+
if (ignoreIfAlreadyExists === true) {
|
|
22334
|
+
const exists = this.scope.findVariable(param.name);
|
|
22335
|
+
if (exists === undefined) {
|
|
22336
|
+
this.scope.addNamedIdentifier(param.name, type);
|
|
22337
|
+
}
|
|
22338
|
+
}
|
|
22339
|
+
else {
|
|
22340
|
+
this.scope.addNamedIdentifier(param.name, type);
|
|
22341
|
+
}
|
|
22310
22342
|
allNames.add(param.name.toUpperCase());
|
|
22311
22343
|
}
|
|
22312
22344
|
}
|
|
@@ -22630,6 +22662,22 @@ class TypeUtils {
|
|
|
22630
22662
|
// todo
|
|
22631
22663
|
return true;
|
|
22632
22664
|
}
|
|
22665
|
+
isCompareable(source1, source2, node1, node2) {
|
|
22666
|
+
/*
|
|
22667
|
+
console.dir(source1);
|
|
22668
|
+
console.dir(source2);
|
|
22669
|
+
*/
|
|
22670
|
+
if (source1 === undefined || source2 === undefined) {
|
|
22671
|
+
return true;
|
|
22672
|
+
}
|
|
22673
|
+
if (source1 instanceof basic_1.HexType && this.isCalculated(node1) && source2 instanceof basic_1.IntegerType) {
|
|
22674
|
+
return false;
|
|
22675
|
+
}
|
|
22676
|
+
if (source2 instanceof basic_1.HexType && this.isCalculated(node2) && source1 instanceof basic_1.IntegerType) {
|
|
22677
|
+
return false;
|
|
22678
|
+
}
|
|
22679
|
+
return true;
|
|
22680
|
+
}
|
|
22633
22681
|
structureContainsString(structure) {
|
|
22634
22682
|
for (const c of structure.getComponents()) {
|
|
22635
22683
|
if (c.type instanceof basic_1.StringType) {
|
|
@@ -22659,6 +22707,13 @@ class TypeUtils {
|
|
|
22659
22707
|
|| node.findFirstExpression(Expressions.ArithOperator) !== undefined;
|
|
22660
22708
|
return calculated;
|
|
22661
22709
|
}
|
|
22710
|
+
isAssignableNew(source, target, node) {
|
|
22711
|
+
const calculated = (node === null || node === void 0 ? void 0 : node.findFirstExpression(Expressions.ArithOperator)) !== undefined;
|
|
22712
|
+
if (calculated && source instanceof basic_1.HexType && target instanceof basic_1.IntegerType) {
|
|
22713
|
+
return false;
|
|
22714
|
+
}
|
|
22715
|
+
return this.isAssignable(source, target);
|
|
22716
|
+
}
|
|
22662
22717
|
isAssignableStrict(source, target, node) {
|
|
22663
22718
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
22664
22719
|
const calculated = node ? this.isCalculated(node) : false;
|
|
@@ -24258,10 +24313,14 @@ const Expressions = __webpack_require__(/*! ../../2_statements/expressions */ ".
|
|
|
24258
24313
|
const source_1 = __webpack_require__(/*! ./source */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/source.js");
|
|
24259
24314
|
const method_call_chain_1 = __webpack_require__(/*! ./method_call_chain */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/method_call_chain.js");
|
|
24260
24315
|
const source_field_symbol_1 = __webpack_require__(/*! ./source_field_symbol */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/source_field_symbol.js");
|
|
24316
|
+
const _syntax_input_1 = __webpack_require__(/*! ../_syntax_input */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_syntax_input.js");
|
|
24317
|
+
const _type_utils_1 = __webpack_require__(/*! ../_type_utils */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_type_utils.js");
|
|
24261
24318
|
class Compare {
|
|
24262
24319
|
static runSyntax(node, input) {
|
|
24263
|
-
|
|
24264
|
-
|
|
24320
|
+
const sourceTypes = [];
|
|
24321
|
+
const sources = node.findDirectExpressions(Expressions.Source);
|
|
24322
|
+
for (const t of sources) {
|
|
24323
|
+
sourceTypes.push(source_1.Source.runSyntax(t, input));
|
|
24265
24324
|
}
|
|
24266
24325
|
for (const t of node.findDirectExpressions(Expressions.SourceFieldSymbolChain)) {
|
|
24267
24326
|
source_field_symbol_1.SourceFieldSymbol.runSyntax(t, input);
|
|
@@ -24269,6 +24328,12 @@ class Compare {
|
|
|
24269
24328
|
for (const t of node.findDirectExpressions(Expressions.MethodCallChain)) {
|
|
24270
24329
|
method_call_chain_1.MethodCallChain.runSyntax(t, input);
|
|
24271
24330
|
}
|
|
24331
|
+
if (node.findDirectExpression(Expressions.CompareOperator)
|
|
24332
|
+
&& new _type_utils_1.TypeUtils(input.scope).isCompareable(sourceTypes[0], sourceTypes[1], sources[0], sources[1]) === false
|
|
24333
|
+
&& sourceTypes.length === 2) {
|
|
24334
|
+
const message = "Incompatible types for comparison";
|
|
24335
|
+
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
24336
|
+
}
|
|
24272
24337
|
}
|
|
24273
24338
|
}
|
|
24274
24339
|
exports.Compare = Compare;
|
|
@@ -28051,53 +28116,84 @@ exports.SQLSource = SQLSource;
|
|
|
28051
28116
|
|
|
28052
28117
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
28053
28118
|
exports.StringTemplate = void 0;
|
|
28119
|
+
const nodes_1 = __webpack_require__(/*! ../../nodes */ "./node_modules/@abaplint/core/build/src/abap/nodes/index.js");
|
|
28054
28120
|
const basic_1 = __webpack_require__(/*! ../../types/basic */ "./node_modules/@abaplint/core/build/src/abap/types/basic/index.js");
|
|
28055
28121
|
const Expressions = __webpack_require__(/*! ../../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
|
|
28056
28122
|
const source_1 = __webpack_require__(/*! ./source */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/source.js");
|
|
28057
28123
|
const _type_utils_1 = __webpack_require__(/*! ../_type_utils */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_type_utils.js");
|
|
28058
28124
|
const _syntax_input_1 = __webpack_require__(/*! ../_syntax_input */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_syntax_input.js");
|
|
28125
|
+
const Tokens = __webpack_require__(/*! ../../1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
|
|
28059
28126
|
class StringTemplate {
|
|
28060
28127
|
static runSyntax(node, input) {
|
|
28061
28128
|
const typeUtils = new _type_utils_1.TypeUtils(input.scope);
|
|
28062
28129
|
const ret = basic_1.StringType.get();
|
|
28063
|
-
for (const
|
|
28064
|
-
|
|
28065
|
-
|
|
28066
|
-
|
|
28067
|
-
|
|
28068
|
-
|
|
28069
|
-
|
|
28070
|
-
|
|
28071
|
-
|
|
28072
|
-
|
|
28073
|
-
|
|
28074
|
-
|
|
28075
|
-
|
|
28076
|
-
|
|
28077
|
-
|
|
28130
|
+
for (const child of node.getChildren()) {
|
|
28131
|
+
if (child instanceof nodes_1.ExpressionNode && child.get() instanceof Expressions.StringTemplateSource) {
|
|
28132
|
+
const s = child.findDirectExpression(Expressions.Source);
|
|
28133
|
+
const type = source_1.Source.runSyntax(s, input, ret);
|
|
28134
|
+
if (type === undefined) {
|
|
28135
|
+
const message = "No target type determined";
|
|
28136
|
+
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
28137
|
+
return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
|
|
28138
|
+
}
|
|
28139
|
+
else if ((typeUtils.isCharLike(type) === false
|
|
28140
|
+
&& typeUtils.isHexLike(type) === false
|
|
28141
|
+
&& !(type instanceof basic_1.UTCLongType))
|
|
28142
|
+
|| type instanceof basic_1.StructureType) {
|
|
28143
|
+
const message = "String template, not character like, " + type.constructor.name;
|
|
28144
|
+
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
28145
|
+
return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
|
|
28146
|
+
}
|
|
28147
|
+
const format = child.findDirectExpression(Expressions.StringTemplateFormatting);
|
|
28148
|
+
const formatConcat = format === null || format === void 0 ? void 0 : format.concatTokens();
|
|
28149
|
+
for (const formatSource of (format === null || format === void 0 ? void 0 : format.findAllExpressions(Expressions.Source)) || []) {
|
|
28150
|
+
source_1.Source.runSyntax(formatSource, input);
|
|
28151
|
+
}
|
|
28152
|
+
if (format
|
|
28153
|
+
&& (formatConcat === null || formatConcat === void 0 ? void 0 : formatConcat.includes("ALPHA = "))
|
|
28154
|
+
&& !(type instanceof basic_1.UnknownType)
|
|
28155
|
+
&& !(type instanceof basic_1.VoidType)
|
|
28156
|
+
&& !(type instanceof basic_1.StringType)
|
|
28157
|
+
&& !(type instanceof basic_1.CLikeType)
|
|
28158
|
+
&& !(type instanceof basic_1.CharacterType)
|
|
28159
|
+
&& !(type instanceof basic_1.NumericGenericType)
|
|
28160
|
+
&& !(type instanceof basic_1.NumericType)
|
|
28161
|
+
&& !(type instanceof basic_1.AnyType)) {
|
|
28162
|
+
const message = `Cannot apply ALPHA to this type (${type.constructor.name})`;
|
|
28163
|
+
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, format.getFirstToken(), message));
|
|
28164
|
+
return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
|
|
28165
|
+
}
|
|
28078
28166
|
}
|
|
28079
|
-
|
|
28080
|
-
|
|
28081
|
-
|
|
28082
|
-
|
|
28083
|
-
|
|
28084
|
-
|
|
28085
|
-
|
|
28086
|
-
|
|
28087
|
-
|
|
28088
|
-
|
|
28089
|
-
|
|
28090
|
-
|
|
28091
|
-
&& !(type instanceof basic_1.NumericGenericType)
|
|
28092
|
-
&& !(type instanceof basic_1.NumericType)
|
|
28093
|
-
&& !(type instanceof basic_1.AnyType)) {
|
|
28094
|
-
const message = `Cannot apply ALPHA to this type (${type.constructor.name})`;
|
|
28095
|
-
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, format.getFirstToken(), message));
|
|
28096
|
-
return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
|
|
28167
|
+
else if (child instanceof nodes_1.TokenNode) {
|
|
28168
|
+
const token = child.get();
|
|
28169
|
+
if (token instanceof Tokens.StringTemplate
|
|
28170
|
+
|| token instanceof Tokens.StringTemplateBegin
|
|
28171
|
+
|| token instanceof Tokens.StringTemplateMiddle
|
|
28172
|
+
|| token instanceof Tokens.StringTemplateEnd) {
|
|
28173
|
+
const issue = this.validateEscapeSequences(token.getStr(), input, child);
|
|
28174
|
+
if (issue) {
|
|
28175
|
+
input.issues.push(issue);
|
|
28176
|
+
return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
|
|
28177
|
+
}
|
|
28178
|
+
}
|
|
28097
28179
|
}
|
|
28098
28180
|
}
|
|
28099
28181
|
return ret;
|
|
28100
28182
|
}
|
|
28183
|
+
static validateEscapeSequences(str, input, node) {
|
|
28184
|
+
// Valid escape sequences in ABAP string templates: \|, \{, \}, \\, \n, \r, \t
|
|
28185
|
+
const validEscapes = new Set(["\\|", "\\{", "\\}", "\\\\", "\\n", "\\r", "\\t"]);
|
|
28186
|
+
for (let i = 0; i < str.length; i++) {
|
|
28187
|
+
if (str[i] === "\\") {
|
|
28188
|
+
const escape = str.substring(i, i + 2);
|
|
28189
|
+
if (!validEscapes.has(escape)) {
|
|
28190
|
+
return (0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), `Invalid escape sequence "${escape}" in string template`);
|
|
28191
|
+
}
|
|
28192
|
+
i++; // skip the next character as it's part of the escape sequence
|
|
28193
|
+
}
|
|
28194
|
+
}
|
|
28195
|
+
return undefined;
|
|
28196
|
+
}
|
|
28101
28197
|
}
|
|
28102
28198
|
exports.StringTemplate = StringTemplate;
|
|
28103
28199
|
//# sourceMappingURL=string_template.js.map
|
|
@@ -32475,7 +32571,7 @@ class Move {
|
|
|
32475
32571
|
return;
|
|
32476
32572
|
}
|
|
32477
32573
|
}
|
|
32478
|
-
else if (new _type_utils_1.TypeUtils(input.scope).
|
|
32574
|
+
else if (new _type_utils_1.TypeUtils(input.scope).isAssignableNew(sourceType, targetType, source) === false) {
|
|
32479
32575
|
const message = "Incompatible types";
|
|
32480
32576
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
32481
32577
|
return;
|
|
@@ -35435,6 +35531,9 @@ class SyntaxLogic {
|
|
|
35435
35531
|
stype = _scope_type_1.ScopeType.FunctionGroup;
|
|
35436
35532
|
}
|
|
35437
35533
|
this.scope.push(stype, this.object.getName(), new position_1.Position(1, 1), main.getFilename());
|
|
35534
|
+
if (this.object instanceof objects_1.FunctionGroup) {
|
|
35535
|
+
this.helpers.proc.findFunctionGroupScope(this.object);
|
|
35536
|
+
}
|
|
35438
35537
|
}
|
|
35439
35538
|
}
|
|
35440
35539
|
else if (this.object instanceof objects_1.TypePool) {
|
|
@@ -39131,6 +39230,9 @@ class FunctionModuleDefinition {
|
|
|
39131
39230
|
getName() {
|
|
39132
39231
|
return this.name;
|
|
39133
39232
|
}
|
|
39233
|
+
isGlobalParameters() {
|
|
39234
|
+
return this.globalParameters;
|
|
39235
|
+
}
|
|
39134
39236
|
///////////////
|
|
39135
39237
|
parse(data) {
|
|
39136
39238
|
if (data.FUNCNAME === undefined) {
|
|
@@ -39139,6 +39241,7 @@ class FunctionModuleDefinition {
|
|
|
39139
39241
|
this.name = data.FUNCNAME;
|
|
39140
39242
|
this.description = data.SHORT_TEXT;
|
|
39141
39243
|
this.parameters = [];
|
|
39244
|
+
this.globalParameters = data.GLOBAL_FLAG === "X";
|
|
39142
39245
|
this.moduleType = FunctionModuleType.regular;
|
|
39143
39246
|
if (data.REMOTE_CALL === "R") {
|
|
39144
39247
|
this.moduleType = FunctionModuleType.remote;
|
|
@@ -54236,7 +54339,7 @@ class Registry {
|
|
|
54236
54339
|
}
|
|
54237
54340
|
static abaplintVersion() {
|
|
54238
54341
|
// magic, see build script "version.sh"
|
|
54239
|
-
return "2.115.
|
|
54342
|
+
return "2.115.16";
|
|
54240
54343
|
}
|
|
54241
54344
|
getDDICReferences() {
|
|
54242
54345
|
return this.ddicReferences;
|
|
@@ -63290,6 +63393,68 @@ exports.Exporting = Exporting;
|
|
|
63290
63393
|
|
|
63291
63394
|
/***/ },
|
|
63292
63395
|
|
|
63396
|
+
/***/ "./node_modules/@abaplint/core/build/src/rules/fm_global_parameters_obsolete.js"
|
|
63397
|
+
/*!**************************************************************************************!*\
|
|
63398
|
+
!*** ./node_modules/@abaplint/core/build/src/rules/fm_global_parameters_obsolete.js ***!
|
|
63399
|
+
\**************************************************************************************/
|
|
63400
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
63401
|
+
|
|
63402
|
+
"use strict";
|
|
63403
|
+
|
|
63404
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
63405
|
+
exports.FMGlobalParametersObsolete = exports.FMGlobalParametersObsoleteConf = void 0;
|
|
63406
|
+
const issue_1 = __webpack_require__(/*! ../issue */ "./node_modules/@abaplint/core/build/src/issue.js");
|
|
63407
|
+
const Objects = __webpack_require__(/*! ../objects */ "./node_modules/@abaplint/core/build/src/objects/index.js");
|
|
63408
|
+
const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
|
|
63409
|
+
const position_1 = __webpack_require__(/*! ../position */ "./node_modules/@abaplint/core/build/src/position.js");
|
|
63410
|
+
class FMGlobalParametersObsoleteConf extends _basic_rule_config_1.BasicRuleConfig {
|
|
63411
|
+
}
|
|
63412
|
+
exports.FMGlobalParametersObsoleteConf = FMGlobalParametersObsoleteConf;
|
|
63413
|
+
class FMGlobalParametersObsolete {
|
|
63414
|
+
constructor() {
|
|
63415
|
+
this.conf = new FMGlobalParametersObsoleteConf();
|
|
63416
|
+
}
|
|
63417
|
+
getMetadata() {
|
|
63418
|
+
return {
|
|
63419
|
+
key: "fm_global_parameters_obsolete",
|
|
63420
|
+
title: "FM Global Parameters Obsolete",
|
|
63421
|
+
shortDescription: `Check for function modules with global parameteers`,
|
|
63422
|
+
extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenglobal_parameters_obsolete.htm`,
|
|
63423
|
+
tags: [],
|
|
63424
|
+
};
|
|
63425
|
+
}
|
|
63426
|
+
initialize(_reg) {
|
|
63427
|
+
return this;
|
|
63428
|
+
}
|
|
63429
|
+
getConfig() {
|
|
63430
|
+
return this.conf;
|
|
63431
|
+
}
|
|
63432
|
+
setConfig(conf) {
|
|
63433
|
+
this.conf = conf;
|
|
63434
|
+
}
|
|
63435
|
+
run(obj) {
|
|
63436
|
+
if (!(obj instanceof Objects.FunctionGroup)) {
|
|
63437
|
+
return [];
|
|
63438
|
+
}
|
|
63439
|
+
const issues = [];
|
|
63440
|
+
for (const module of obj.getModules()) {
|
|
63441
|
+
if (module.isGlobalParameters() === true) {
|
|
63442
|
+
const file = obj.getMainABAPFile();
|
|
63443
|
+
if (file === undefined) {
|
|
63444
|
+
continue;
|
|
63445
|
+
}
|
|
63446
|
+
const message = `Function Module "${module.getName()}" uses obsolete global parameters`;
|
|
63447
|
+
issues.push(issue_1.Issue.atPosition(file, new position_1.Position(1, 1), message, this.getMetadata().key, this.conf.severity));
|
|
63448
|
+
}
|
|
63449
|
+
}
|
|
63450
|
+
return issues;
|
|
63451
|
+
}
|
|
63452
|
+
}
|
|
63453
|
+
exports.FMGlobalParametersObsolete = FMGlobalParametersObsolete;
|
|
63454
|
+
//# sourceMappingURL=fm_global_parameters_obsolete.js.map
|
|
63455
|
+
|
|
63456
|
+
/***/ },
|
|
63457
|
+
|
|
63293
63458
|
/***/ "./node_modules/@abaplint/core/build/src/rules/forbidden_identifier.js"
|
|
63294
63459
|
/*!*****************************************************************************!*\
|
|
63295
63460
|
!*** ./node_modules/@abaplint/core/build/src/rules/forbidden_identifier.js ***!
|
|
@@ -65660,6 +65825,7 @@ __exportStar(__webpack_require__(/*! ./empty_structure */ "./node_modules/@abapl
|
|
|
65660
65825
|
__exportStar(__webpack_require__(/*! ./exit_or_check */ "./node_modules/@abaplint/core/build/src/rules/exit_or_check.js"), exports);
|
|
65661
65826
|
__exportStar(__webpack_require__(/*! ./expand_macros */ "./node_modules/@abaplint/core/build/src/rules/expand_macros.js"), exports);
|
|
65662
65827
|
__exportStar(__webpack_require__(/*! ./exporting */ "./node_modules/@abaplint/core/build/src/rules/exporting.js"), exports);
|
|
65828
|
+
__exportStar(__webpack_require__(/*! ./fm_global_parameters_obsolete */ "./node_modules/@abaplint/core/build/src/rules/fm_global_parameters_obsolete.js"), exports);
|
|
65663
65829
|
__exportStar(__webpack_require__(/*! ./forbidden_identifier */ "./node_modules/@abaplint/core/build/src/rules/forbidden_identifier.js"), exports);
|
|
65664
65830
|
__exportStar(__webpack_require__(/*! ./forbidden_pseudo_and_pragma */ "./node_modules/@abaplint/core/build/src/rules/forbidden_pseudo_and_pragma.js"), exports);
|
|
65665
65831
|
__exportStar(__webpack_require__(/*! ./forbidden_void_type */ "./node_modules/@abaplint/core/build/src/rules/forbidden_void_type.js"), exports);
|
|
@@ -65673,6 +65839,7 @@ __exportStar(__webpack_require__(/*! ./identical_conditions */ "./node_modules/@
|
|
|
65673
65839
|
__exportStar(__webpack_require__(/*! ./identical_contents */ "./node_modules/@abaplint/core/build/src/rules/identical_contents.js"), exports);
|
|
65674
65840
|
__exportStar(__webpack_require__(/*! ./identical_descriptions */ "./node_modules/@abaplint/core/build/src/rules/identical_descriptions.js"), exports);
|
|
65675
65841
|
__exportStar(__webpack_require__(/*! ./identical_form_names */ "./node_modules/@abaplint/core/build/src/rules/identical_form_names.js"), exports);
|
|
65842
|
+
__exportStar(__webpack_require__(/*! ./identical_move */ "./node_modules/@abaplint/core/build/src/rules/identical_move.js"), exports);
|
|
65676
65843
|
__exportStar(__webpack_require__(/*! ./if_in_if */ "./node_modules/@abaplint/core/build/src/rules/if_in_if.js"), exports);
|
|
65677
65844
|
__exportStar(__webpack_require__(/*! ./implement_methods */ "./node_modules/@abaplint/core/build/src/rules/implement_methods.js"), exports);
|
|
65678
65845
|
__exportStar(__webpack_require__(/*! ./implicit_start_of_selection */ "./node_modules/@abaplint/core/build/src/rules/implicit_start_of_selection.js"), exports);
|
|
@@ -65684,7 +65851,6 @@ __exportStar(__webpack_require__(/*! ./intf_referencing_clas */ "./node_modules/
|
|
|
65684
65851
|
__exportStar(__webpack_require__(/*! ./invalid_table_index */ "./node_modules/@abaplint/core/build/src/rules/invalid_table_index.js"), exports);
|
|
65685
65852
|
__exportStar(__webpack_require__(/*! ./keep_single_parameter_on_one_line */ "./node_modules/@abaplint/core/build/src/rules/keep_single_parameter_on_one_line.js"), exports);
|
|
65686
65853
|
__exportStar(__webpack_require__(/*! ./keyword_case */ "./node_modules/@abaplint/core/build/src/rules/keyword_case.js"), exports);
|
|
65687
|
-
__exportStar(__webpack_require__(/*! ./identical_move */ "./node_modules/@abaplint/core/build/src/rules/identical_move.js"), exports);
|
|
65688
65854
|
__exportStar(__webpack_require__(/*! ./line_break_multiple_parameters */ "./node_modules/@abaplint/core/build/src/rules/line_break_multiple_parameters.js"), exports);
|
|
65689
65855
|
__exportStar(__webpack_require__(/*! ./line_break_style */ "./node_modules/@abaplint/core/build/src/rules/line_break_style.js"), exports);
|
|
65690
65856
|
__exportStar(__webpack_require__(/*! ./line_length */ "./node_modules/@abaplint/core/build/src/rules/line_length.js"), exports);
|
|
@@ -80075,7 +80241,10 @@ class ConstantTranspiler {
|
|
|
80075
80241
|
this.addGet = addGet;
|
|
80076
80242
|
}
|
|
80077
80243
|
handleInteger(int, traversal) {
|
|
80078
|
-
|
|
80244
|
+
let concat = int.concatTokens().trim().replace(/^0+/, "");
|
|
80245
|
+
if (concat === "") {
|
|
80246
|
+
concat = "0";
|
|
80247
|
+
}
|
|
80079
80248
|
const parsed = Number.parseInt(concat, 10);
|
|
80080
80249
|
let code = "";
|
|
80081
80250
|
if (concat.length > 18) {
|
|
@@ -93029,7 +93198,13 @@ this.INTERNAL_ID = abap.internalIdCounter++;\n`;
|
|
|
93029
93198
|
}
|
|
93030
93199
|
// handle aliases after initialization of carrier variables
|
|
93031
93200
|
for (const a of def.getAliases() || []) {
|
|
93032
|
-
|
|
93201
|
+
const thisName = `this.${a.getName().toLowerCase()}`;
|
|
93202
|
+
const aliasName = "this." + Traversal.escapeNamespace(a.getComponent().replace("~", "$").toLowerCase());
|
|
93203
|
+
ret += `if (${thisName} === undefined)\n`;
|
|
93204
|
+
ret += thisName + " = " + aliasName + ";\n";
|
|
93205
|
+
// or the method(if its a method) might be implemented as its aliased name
|
|
93206
|
+
ret += `else if (${aliasName} === undefined)\n`;
|
|
93207
|
+
ret += aliasName + " = " + thisName + ";\n";
|
|
93033
93208
|
}
|
|
93034
93209
|
// constants can be accessed both statically and via reference
|
|
93035
93210
|
for (const c of def.getAttributes()?.getConstants() || []) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler-cli",
|
|
3
|
-
"version": "2.12.
|
|
3
|
+
"version": "2.12.25",
|
|
4
4
|
"description": "Transpiler - Command Line Interface",
|
|
5
5
|
"funding": "https://github.com/sponsors/larshp",
|
|
6
6
|
"bin": {
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
"author": "abaplint",
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@abaplint/core": "^2.115.
|
|
31
|
-
"@abaplint/transpiler": "^2.12.
|
|
30
|
+
"@abaplint/core": "^2.115.16",
|
|
31
|
+
"@abaplint/transpiler": "^2.12.25",
|
|
32
32
|
"@types/glob": "^8.1.0",
|
|
33
|
-
"@types/node": "^24.10.
|
|
33
|
+
"@types/node": "^24.10.8",
|
|
34
34
|
"@types/progress": "^2.0.7",
|
|
35
35
|
"glob": "=7.2.0",
|
|
36
36
|
"progress": "^2.0.3",
|