@abaplint/core 2.101.7 → 2.101.8
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_arithmetic_operator.js +13 -0
- package/build/src/abap/2_statements/expressions/sql_arithmetics.js +2 -3
- package/build/src/abap/2_statements/expressions/sql_field_and_value.js +4 -1
- package/build/src/registry.js +1 -1
- package/build/src/rules/downport.js +3 -0
- package/package.json +1 -1
package/build/abaplint.d.ts
CHANGED
|
@@ -2131,6 +2131,7 @@ declare namespace Expressions {
|
|
|
2131
2131
|
SQLAggregation,
|
|
2132
2132
|
SQLAliasField,
|
|
2133
2133
|
SQLArithmetics,
|
|
2134
|
+
SQLArithmeticOperator,
|
|
2134
2135
|
SQLAsName,
|
|
2135
2136
|
SQLCase,
|
|
2136
2137
|
SQLCDSParameters,
|
|
@@ -5308,6 +5309,10 @@ declare class SQLAliasField extends Expression {
|
|
|
5308
5309
|
getRunnable(): IStatementRunnable;
|
|
5309
5310
|
}
|
|
5310
5311
|
|
|
5312
|
+
declare class SQLArithmeticOperator extends Expression {
|
|
5313
|
+
getRunnable(): IStatementRunnable;
|
|
5314
|
+
}
|
|
5315
|
+
|
|
5311
5316
|
declare class SQLArithmetics extends Expression {
|
|
5312
5317
|
getRunnable(): IStatementRunnable;
|
|
5313
5318
|
}
|
|
@@ -169,6 +169,7 @@ __exportStar(require("./source"), exports);
|
|
|
169
169
|
__exportStar(require("./sql_aggregation"), exports);
|
|
170
170
|
__exportStar(require("./sql_alias_field"), exports);
|
|
171
171
|
__exportStar(require("./sql_arithmetics"), exports);
|
|
172
|
+
__exportStar(require("./sql_arithmetic_operator"), exports);
|
|
172
173
|
__exportStar(require("./sql_as_name"), exports);
|
|
173
174
|
__exportStar(require("./sql_case"), exports);
|
|
174
175
|
__exportStar(require("./sql_cds_parameters"), exports);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SQLArithmeticOperator = void 0;
|
|
4
|
+
const combi_1 = require("../combi");
|
|
5
|
+
const tokens_1 = require("../../1_lexer/tokens");
|
|
6
|
+
class SQLArithmeticOperator extends combi_1.Expression {
|
|
7
|
+
getRunnable() {
|
|
8
|
+
const operator = (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.WPlusW), (0, combi_1.tok)(tokens_1.WDashW), "*", "/");
|
|
9
|
+
return operator;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.SQLArithmeticOperator = SQLArithmeticOperator;
|
|
13
|
+
//# sourceMappingURL=sql_arithmetic_operator.js.map
|
|
@@ -3,12 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.SQLArithmetics = void 0;
|
|
4
4
|
const combi_1 = require("../combi");
|
|
5
5
|
const _1 = require(".");
|
|
6
|
-
const
|
|
6
|
+
const sql_arithmetic_operator_1 = require("./sql_arithmetic_operator");
|
|
7
7
|
class SQLArithmetics extends combi_1.Expression {
|
|
8
8
|
getRunnable() {
|
|
9
|
-
const operator = (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.WPlusW), (0, combi_1.tok)(tokens_1.WDashW), "*", "/");
|
|
10
9
|
const field = (0, combi_1.alt)(_1.SQLFieldName, _1.SQLFunction);
|
|
11
|
-
return (0, combi_1.seq)(field, (0, combi_1.starPrio)((0, combi_1.seq)(
|
|
10
|
+
return (0, combi_1.seq)(field, (0, combi_1.starPrio)((0, combi_1.seq)(sql_arithmetic_operator_1.SQLArithmeticOperator, field)));
|
|
12
11
|
}
|
|
13
12
|
}
|
|
14
13
|
exports.SQLArithmetics = SQLArithmetics;
|
|
@@ -2,11 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SQLFieldAndValue = void 0;
|
|
4
4
|
const combi_1 = require("../combi");
|
|
5
|
+
const integer_1 = require("./integer");
|
|
6
|
+
const sql_arithmetic_operator_1 = require("./sql_arithmetic_operator");
|
|
5
7
|
const sql_field_name_1 = require("./sql_field_name");
|
|
6
8
|
const sql_source_1 = require("./sql_source");
|
|
7
9
|
class SQLFieldAndValue extends combi_1.Expression {
|
|
8
10
|
getRunnable() {
|
|
9
|
-
const
|
|
11
|
+
const opt1 = (0, combi_1.seq)((0, combi_1.altPrio)(integer_1.Integer, sql_field_name_1.SQLFieldName), sql_arithmetic_operator_1.SQLArithmeticOperator, sql_source_1.SQLSource);
|
|
12
|
+
const param = (0, combi_1.seq)(sql_field_name_1.SQLFieldName, "=", (0, combi_1.altPrio)(opt1, sql_source_1.SQLSource));
|
|
10
13
|
return param;
|
|
11
14
|
}
|
|
12
15
|
}
|
package/build/src/registry.js
CHANGED
|
@@ -872,6 +872,9 @@ ${indentation}ENDIF.
|
|
|
872
872
|
${indentation}`);
|
|
873
873
|
const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, startToken.getStart(), tableExpression.getLastToken().getEnd(), uniqueName);
|
|
874
874
|
const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
|
|
875
|
+
if (high.get() instanceof Statements.ElseIf) {
|
|
876
|
+
throw "downport, unable to downport table expression in ELSEIF";
|
|
877
|
+
}
|
|
875
878
|
return issue_1.Issue.atToken(lowFile, high.getFirstToken(), "Outline table expression", this.getMetadata().key, this.conf.severity, fix);
|
|
876
879
|
}
|
|
877
880
|
return undefined;
|