@abaplint/core 2.119.0 → 2.119.2
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/src/abap/2_statements/expressions/sql_field_name.js +1 -1
- package/build/src/abap/2_statements/expressions/sql_function.js +3 -1
- package/build/src/abap/2_statements/statements/at_selection_screen.js +1 -1
- package/build/src/abap/5_syntax/_type_utils.js +5 -1
- package/build/src/abap/5_syntax/expressions/form_param.js +8 -2
- package/build/src/registry.js +1 -1
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ exports.SQLFieldName = void 0;
|
|
|
4
4
|
const combi_1 = require("../combi");
|
|
5
5
|
class SQLFieldName extends combi_1.Expression {
|
|
6
6
|
getRunnable() {
|
|
7
|
-
return (0, combi_1.regex)(/^(?!(?:SINGLE|INTO|DISTINCT|AS|WHERE|FOR|HAVING|APPENDING|UP|FROM)$)(\/\w+\/)?(
|
|
7
|
+
return (0, combi_1.regex)(/^(?!(?:SINGLE|INTO|DISTINCT|AS|WHERE|FOR|HAVING|APPENDING|UP|FROM)$)(\/\w+\/)?(\*?\w+~(\/\w+\/)?(\w+|\*)|\w+)$/i);
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
exports.SQLFieldName = SQLFieldName;
|
|
@@ -36,7 +36,9 @@ class SQLFunction extends combi_1.Expression {
|
|
|
36
36
|
const dats_add_months = (0, combi_1.ver)(version_1.Version.v754, (0, combi_1.seq)((0, combi_1.regex)(/^dats_add_months$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
|
|
37
37
|
const ltrim = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)((0, combi_1.regex)(/^ltrim$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
|
|
38
38
|
const rtrim = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)((0, combi_1.regex)(/^rtrim$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
|
|
39
|
-
|
|
39
|
+
const right = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)((0, combi_1.regex)(/^right$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
|
|
40
|
+
const left = (0, combi_1.ver)(version_1.Version.v751, (0, combi_1.seq)((0, combi_1.regex)(/^left$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
|
|
41
|
+
return (0, combi_1.altPrio)(uuid, abs, ceil, floor, cast, div, mod, coalesce, concat, replace, length, lower, upper, round, concat_with_space, ltrim, rtrim, right, left, substring, dats_is_valid, dats_days_between, dats_add_days, dats_add_months);
|
|
40
42
|
}
|
|
41
43
|
}
|
|
42
44
|
exports.SQLFunction = SQLFunction;
|
|
@@ -12,7 +12,7 @@ class AtSelectionScreen {
|
|
|
12
12
|
const field = (0, combi_1.seq)("ON", expressions_1.FieldSub);
|
|
13
13
|
const end = (0, combi_1.seq)("ON END OF", expressions_1.Field);
|
|
14
14
|
const radio = (0, combi_1.seq)("ON RADIOBUTTON GROUP", expressions_1.Field);
|
|
15
|
-
const block = (0, combi_1.seq)("ON BLOCK",
|
|
15
|
+
const block = (0, combi_1.seq)("ON BLOCK", expressions_1.BlockName);
|
|
16
16
|
const help = (0, combi_1.seq)("ON HELP-REQUEST FOR", expressions_1.FieldSub);
|
|
17
17
|
const ret = (0, combi_1.seq)("AT SELECTION-SCREEN", (0, combi_1.opt)((0, combi_1.alt)(output, value, radio, exit, field, end, help, block)));
|
|
18
18
|
return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
|
|
@@ -431,7 +431,11 @@ class TypeUtils {
|
|
|
431
431
|
}
|
|
432
432
|
}
|
|
433
433
|
else if (source instanceof basic_1.TableType) {
|
|
434
|
-
if (
|
|
434
|
+
if (source.getRowType() instanceof basic_1.AnyType) {
|
|
435
|
+
// then its a generic table, todo: add top level generic table type?
|
|
436
|
+
return true;
|
|
437
|
+
}
|
|
438
|
+
else if (target instanceof basic_1.TableType) {
|
|
435
439
|
const sourceKeyType = source.getOptions().keyType;
|
|
436
440
|
const targetKeyType = target.getOptions().keyType;
|
|
437
441
|
if (sourceKeyType !== targetKeyType
|
|
@@ -9,7 +9,7 @@ const assert_error_1 = require("../assert_error");
|
|
|
9
9
|
const tokens_1 = require("../../1_lexer/tokens");
|
|
10
10
|
class FormParam {
|
|
11
11
|
static runSyntax(node, input) {
|
|
12
|
-
var _a, _b;
|
|
12
|
+
var _a, _b, _c;
|
|
13
13
|
const formParamName = node.findFirstExpression(expressions_1.FormParamName);
|
|
14
14
|
if (formParamName === undefined) {
|
|
15
15
|
throw new assert_error_1.AssertError("FormParam, could not find FormParamName");
|
|
@@ -37,7 +37,13 @@ class FormParam {
|
|
|
37
37
|
// untyped FORM parameter
|
|
38
38
|
return new _typed_identifier_1.TypedIdentifier(nameToken, input.filename, basic_1.AnyType.get(), ["form_parameter" /* IdentifierMeta.FormParameter */]);
|
|
39
39
|
}
|
|
40
|
-
|
|
40
|
+
let bfound = new basic_types_1.BasicTypes(input).parseType(node);
|
|
41
|
+
const isTypeC = ((_c = node.findFirstExpression(expressions_1.TypeName)) === null || _c === void 0 ? void 0 : _c.concatTokens().toUpperCase()) === "C";
|
|
42
|
+
const hasExplicitLength = node.findFirstExpression(expressions_1.Length) !== undefined
|
|
43
|
+
|| node.findFirstExpression(expressions_1.ConstantFieldLength) !== undefined;
|
|
44
|
+
if (isTypeC && hasExplicitLength === false && bfound instanceof basic_1.CharacterType) {
|
|
45
|
+
bfound = basic_1.CGenericType.get();
|
|
46
|
+
}
|
|
41
47
|
if (nameToken && bfound) {
|
|
42
48
|
return new _typed_identifier_1.TypedIdentifier(nameToken, input.filename, bfound, ["form_parameter" /* IdentifierMeta.FormParameter */]);
|
|
43
49
|
}
|
package/build/src/registry.js
CHANGED