@abaplint/core 2.102.62 → 2.102.64
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/abaplint.d.ts +5 -0
- package/build/src/abap/2_statements/expressions/index.js +1 -0
- package/build/src/abap/2_statements/expressions/sql_in.js +1 -1
- package/build/src/abap/2_statements/expressions/sql_source_no_space.js +16 -0
- package/build/src/abap/5_syntax/_builtin.js +1 -1
- package/build/src/abap/5_syntax/_type_utils.js +3 -2
- package/build/src/registry.js +1 -1
- package/build/src/rules/downport.js +1 -0
- package/package.json +1 -1
package/build/abaplint.d.ts
CHANGED
|
@@ -2195,6 +2195,7 @@ declare namespace Expressions {
|
|
|
2195
2195
|
SQLPath,
|
|
2196
2196
|
SQLSourceSimple,
|
|
2197
2197
|
SQLSource,
|
|
2198
|
+
SQLSourceNoSpace,
|
|
2198
2199
|
SQLTarget,
|
|
2199
2200
|
SQLUpTo,
|
|
2200
2201
|
StringTemplateFormatting,
|
|
@@ -5527,6 +5528,10 @@ declare class SQLSource extends Expression {
|
|
|
5527
5528
|
getRunnable(): IStatementRunnable;
|
|
5528
5529
|
}
|
|
5529
5530
|
|
|
5531
|
+
declare class SQLSourceNoSpace extends Expression {
|
|
5532
|
+
getRunnable(): IStatementRunnable;
|
|
5533
|
+
}
|
|
5534
|
+
|
|
5530
5535
|
declare class SQLSourceSimple extends Expression {
|
|
5531
5536
|
getRunnable(): IStatementRunnable;
|
|
5532
5537
|
}
|
|
@@ -199,6 +199,7 @@ __exportStar(require("./sql_order_by"), exports);
|
|
|
199
199
|
__exportStar(require("./sql_path"), exports);
|
|
200
200
|
__exportStar(require("./sql_source_simple"), exports);
|
|
201
201
|
__exportStar(require("./sql_source"), exports);
|
|
202
|
+
__exportStar(require("./sql_source_no_space"), exports);
|
|
202
203
|
__exportStar(require("./sql_target"), exports);
|
|
203
204
|
__exportStar(require("./sql_up_to"), exports);
|
|
204
205
|
__exportStar(require("./string_template_formatting"), exports);
|
|
@@ -8,7 +8,7 @@ const version_1 = require("../../../version");
|
|
|
8
8
|
class SQLIn extends combi_1.Expression {
|
|
9
9
|
getRunnable() {
|
|
10
10
|
const val = new _1.SQLSource();
|
|
11
|
-
const short =
|
|
11
|
+
const short = new _1.SQLSourceNoSpace();
|
|
12
12
|
const listOld = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeft), (0, combi_1.alt)((0, combi_1.ver)(version_1.Version.v740sp05, short), val), (0, combi_1.starPrio)((0, combi_1.seq)(",", val)), (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.ParenRight), (0, combi_1.tok)(tokens_1.ParenRightW), (0, combi_1.tok)(tokens_1.WParenRightW)));
|
|
13
13
|
const listNew = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeftW), val, (0, combi_1.starPrio)((0, combi_1.seq)(",", (0, combi_1.altPrio)(short, val))), (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.WParenRight), (0, combi_1.tok)(tokens_1.WParenRightW)));
|
|
14
14
|
const list = (0, combi_1.alt)(listOld, (0, combi_1.ver)(version_1.Version.v740sp02, listNew)); // version is a guess, https://github.com/abaplint/abaplint/issues/2530
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SQLSourceNoSpace = void 0;
|
|
4
|
+
const combi_1 = require("../combi");
|
|
5
|
+
const version_1 = require("../../../version");
|
|
6
|
+
const tokens_1 = require("../../1_lexer/tokens");
|
|
7
|
+
const _1 = require(".");
|
|
8
|
+
class SQLSourceNoSpace extends combi_1.Expression {
|
|
9
|
+
getRunnable() {
|
|
10
|
+
const paren = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.ParenLeftW), _1.Source, (0, combi_1.tok)(tokens_1.WParenRightW));
|
|
11
|
+
const at = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.tok)(tokens_1.At), (0, combi_1.altPrio)(_1.SimpleSource3, paren)));
|
|
12
|
+
return (0, combi_1.alt)(_1.SQLAliasField, _1.SimpleSource3, at);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.SQLSourceNoSpace = SQLSourceNoSpace;
|
|
16
|
+
//# sourceMappingURL=sql_source_no_space.js.map
|
|
@@ -295,9 +295,10 @@ class TypeUtils {
|
|
|
295
295
|
}
|
|
296
296
|
return true;
|
|
297
297
|
}
|
|
298
|
-
else if (target instanceof basic_1.
|
|
299
|
-
return
|
|
298
|
+
else if (target instanceof basic_1.VoidType || target instanceof basic_1.AnyType) {
|
|
299
|
+
return true;
|
|
300
300
|
}
|
|
301
|
+
return false;
|
|
301
302
|
}
|
|
302
303
|
else if (source instanceof basic_1.Integer8Type) {
|
|
303
304
|
if (target instanceof basic_1.IntegerType || target instanceof basic_1.StringType) {
|
package/build/src/registry.js
CHANGED
|
@@ -552,6 +552,7 @@ Make sure to test the downported code, it might not always be completely correct
|
|
|
552
552
|
};
|
|
553
553
|
const candidates = [high.findAllExpressionsRecursive(Expressions.SQLTarget),
|
|
554
554
|
high.findAllExpressionsRecursive(Expressions.SQLSource),
|
|
555
|
+
high.findAllExpressionsRecursive(Expressions.SQLSourceNoSpace),
|
|
555
556
|
high.findAllExpressionsRecursive(Expressions.SQLSourceSimple)].flat();
|
|
556
557
|
for (const c of candidates.reverse()) {
|
|
557
558
|
if (c.getFirstToken() instanceof tokens_1.WAt
|