@abaplint/cli 2.119.65 → 2.119.67
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/cli.js +41 -4
- package/package.json +2 -2
package/build/cli.js
CHANGED
|
@@ -27576,7 +27576,8 @@ class TypeUtils {
|
|
|
27576
27576
|
console.dir(target);
|
|
27577
27577
|
console.dir(calculated);
|
|
27578
27578
|
*/
|
|
27579
|
-
if (calculated && source instanceof basic_1.StringType
|
|
27579
|
+
if (calculated && source instanceof basic_1.StringType
|
|
27580
|
+
&& (target instanceof basic_1.XStringType || target instanceof basic_1.XSequenceType)) {
|
|
27580
27581
|
return false;
|
|
27581
27582
|
}
|
|
27582
27583
|
if (calculated) {
|
|
@@ -32149,6 +32150,7 @@ const source_1 = __webpack_require__(/*! ./source */ "../core/build/src/abap/5_s
|
|
|
32149
32150
|
const _type_utils_1 = __webpack_require__(/*! ../_type_utils */ "../core/build/src/abap/5_syntax/_type_utils.js");
|
|
32150
32151
|
const _syntax_input_1 = __webpack_require__(/*! ../_syntax_input */ "../core/build/src/abap/5_syntax/_syntax_input.js");
|
|
32151
32152
|
const constant_1 = __webpack_require__(/*! ./constant */ "../core/build/src/abap/5_syntax/expressions/constant.js");
|
|
32153
|
+
const _builtin_1 = __webpack_require__(/*! ../_builtin */ "../core/build/src/abap/5_syntax/_builtin.js");
|
|
32152
32154
|
class MethodCallParam {
|
|
32153
32155
|
static runSyntax(node, input, method) {
|
|
32154
32156
|
if (!(node.get() instanceof Expressions.MethodCallParam)) {
|
|
@@ -32209,6 +32211,19 @@ class MethodCallParam {
|
|
|
32209
32211
|
let sourceType = undefined;
|
|
32210
32212
|
if (child.get() instanceof Expressions.Source) {
|
|
32211
32213
|
sourceType = source_1.Source.runSyntax(child, input, targetType);
|
|
32214
|
+
const chain = child.findDirectExpression(Expressions.FieldChain);
|
|
32215
|
+
const isCalculated = child.findDirectExpression(Expressions.Source) !== undefined;
|
|
32216
|
+
const hasOffsetOrLength = chain !== undefined
|
|
32217
|
+
&& isCalculated === false
|
|
32218
|
+
&& (chain.findDirectExpression(Expressions.FieldOffset) !== undefined
|
|
32219
|
+
|| chain.findDirectExpression(Expressions.FieldLength) !== undefined);
|
|
32220
|
+
if (hasOffsetOrLength
|
|
32221
|
+
&& !(method instanceof _builtin_1.BuiltInMethod)
|
|
32222
|
+
&& (sourceType instanceof basic_1.StringType || sourceType instanceof basic_1.XStringType)) {
|
|
32223
|
+
const message = `Offsets or lengths cannot be specified for fields of type "STRING" or "XSTRING" in the current statement`;
|
|
32224
|
+
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, child.getFirstToken(), message));
|
|
32225
|
+
return;
|
|
32226
|
+
}
|
|
32212
32227
|
}
|
|
32213
32228
|
else if (child.get() instanceof Expressions.ConstantString) {
|
|
32214
32229
|
sourceType = constant_1.Constant.runSyntax(child);
|
|
@@ -37998,6 +38013,11 @@ class Concatenate {
|
|
|
37998
38013
|
runSyntax(node, input) {
|
|
37999
38014
|
const byteMode = node.findDirectTokenByText("BYTE") !== undefined;
|
|
38000
38015
|
const linesMode = node.findDirectTokenByText("LINES") !== undefined;
|
|
38016
|
+
if (node.findFirstExpression(Expressions.TableExpression) !== undefined) {
|
|
38017
|
+
const message = "CONCATENATE with table expression not possible";
|
|
38018
|
+
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
38019
|
+
return;
|
|
38020
|
+
}
|
|
38001
38021
|
const target = node.findFirstExpression(Expressions.Target);
|
|
38002
38022
|
const inline = target === null || target === void 0 ? void 0 : target.findDirectExpression(Expressions.InlineData);
|
|
38003
38023
|
if (inline) {
|
|
@@ -68827,7 +68847,7 @@ class Registry {
|
|
|
68827
68847
|
}
|
|
68828
68848
|
static abaplintVersion() {
|
|
68829
68849
|
// magic, see build script "version.js"
|
|
68830
|
-
return "2.119.
|
|
68850
|
+
return "2.119.67";
|
|
68831
68851
|
}
|
|
68832
68852
|
getDDICReferences() {
|
|
68833
68853
|
return this.ddicReferences;
|
|
@@ -75572,6 +75592,18 @@ Make sure to test the downported code, it might not always be completely correct
|
|
|
75572
75592
|
}
|
|
75573
75593
|
}
|
|
75574
75594
|
}
|
|
75595
|
+
// INTO after WHERE parses as a valid SELECT in the low version, but is only allowed in
|
|
75596
|
+
// strict SQL syntax, so move it also when the statement is no longer Unknown
|
|
75597
|
+
if (ret.length === 0) {
|
|
75598
|
+
for (let i = 0; i < lowStatements.length; i++) {
|
|
75599
|
+
const low = lowStatements[i];
|
|
75600
|
+
const high = highStatements[i];
|
|
75601
|
+
const issue = this.downportSQLMoveInto(low, high, lowFile, highSyntax);
|
|
75602
|
+
if (issue) {
|
|
75603
|
+
ret.push(issue);
|
|
75604
|
+
}
|
|
75605
|
+
}
|
|
75606
|
+
}
|
|
75575
75607
|
}
|
|
75576
75608
|
return ret;
|
|
75577
75609
|
}
|
|
@@ -75815,10 +75847,14 @@ Make sure to test the downported code, it might not always be completely correct
|
|
|
75815
75847
|
return undefined;
|
|
75816
75848
|
}
|
|
75817
75849
|
//////////////////////////////////////////
|
|
75818
|
-
/** move INTO from after WHERE to after FROM
|
|
75850
|
+
/** move INTO from after WHERE to after FROM,
|
|
75851
|
+
* note that INTO after WHERE is only valid in strict SQL syntax, so it must be moved when
|
|
75852
|
+
* downporting; this can happen both while the statement is still Unknown(from the main loop)
|
|
75853
|
+
* and after the @ and FIELDS have been removed, leaving a SELECT that parses in the low version */
|
|
75819
75854
|
downportSQLMoveInto(low, high, lowFile, _highSyntax) {
|
|
75820
75855
|
var _a;
|
|
75821
|
-
if (!(
|
|
75856
|
+
if (!(high.get() instanceof Statements.Select)
|
|
75857
|
+
&& !(high.get() instanceof Statements.SelectLoop)) {
|
|
75822
75858
|
return undefined;
|
|
75823
75859
|
}
|
|
75824
75860
|
// note: SQLCond is also used in JOIN(FROM) conditions
|
|
@@ -75826,6 +75862,7 @@ Make sure to test the downported code, it might not always be completely correct
|
|
|
75826
75862
|
if (where === undefined) {
|
|
75827
75863
|
return undefined;
|
|
75828
75864
|
}
|
|
75865
|
+
// the FIELDS list sits between FROM and WHERE, wait for it to be removed first
|
|
75829
75866
|
if (high.findFirstExpression(Expressions.SQLFields) !== undefined) {
|
|
75830
75867
|
return undefined;
|
|
75831
75868
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/cli",
|
|
3
|
-
"version": "2.119.
|
|
3
|
+
"version": "2.119.67",
|
|
4
4
|
"description": "abaplint - Command Line Interface",
|
|
5
5
|
"funding": "https://github.com/sponsors/larshp",
|
|
6
6
|
"bin": {
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"homepage": "https://abaplint.org",
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@abaplint/core": "^2.119.
|
|
42
|
+
"@abaplint/core": "^2.119.67",
|
|
43
43
|
"@types/chai": "^4.3.20",
|
|
44
44
|
"@types/minimist": "^1.2.5",
|
|
45
45
|
"@types/mocha": "^10.0.10",
|