@abaplint/core 2.95.13 → 2.95.15
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_list.js +3 -2
- package/build/src/abap/2_statements/expressions/write_offset_length.js +3 -3
- package/build/src/abap/5_syntax/statements/create_object.js +4 -1
- package/build/src/abap/5_syntax/statements/write.js +5 -0
- package/build/src/registry.js +1 -1
- package/package.json +5 -5
|
@@ -6,8 +6,9 @@ const _1 = require(".");
|
|
|
6
6
|
const version_1 = require("../../../version");
|
|
7
7
|
class SQLFieldList extends combi_1.Expression {
|
|
8
8
|
getRunnable() {
|
|
9
|
-
const
|
|
10
|
-
|
|
9
|
+
const nev = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.starPrio)((0, combi_1.seq)(",", _1.SQLField)));
|
|
10
|
+
const old = (0, combi_1.starPrio)(_1.SQLField);
|
|
11
|
+
return (0, combi_1.altPrio)("*", _1.Dynamic, (0, combi_1.seq)(_1.SQLField, (0, combi_1.alt)(nev, old)));
|
|
11
12
|
}
|
|
12
13
|
}
|
|
13
14
|
exports.SQLFieldList = SQLFieldList;
|
|
@@ -3,13 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.WriteOffsetLength = void 0;
|
|
4
4
|
const combi_1 = require("../combi");
|
|
5
5
|
const tokens_1 = require("../../1_lexer/tokens");
|
|
6
|
-
const
|
|
6
|
+
const simple_field_chain2_1 = require("./simple_field_chain2");
|
|
7
7
|
class WriteOffsetLength extends combi_1.Expression {
|
|
8
8
|
getRunnable() {
|
|
9
|
-
const post = (0, combi_1.seq)((0, combi_1.alt)(
|
|
9
|
+
const post = (0, combi_1.seq)((0, combi_1.alt)(simple_field_chain2_1.SimpleFieldChain2, (0, combi_1.regex)(/^[\d]+$/), (0, combi_1.regex)(/^\*$/)), (0, combi_1.alt)((0, combi_1.tok)(tokens_1.ParenRightW), (0, combi_1.tok)(tokens_1.ParenRight)));
|
|
10
10
|
const wlength = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeft), post);
|
|
11
11
|
const length = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.ParenLeft), post);
|
|
12
|
-
const complex = (0, combi_1.alt)(wlength, (0, combi_1.seq)((0, combi_1.alt)(
|
|
12
|
+
const complex = (0, combi_1.alt)(wlength, (0, combi_1.seq)((0, combi_1.alt)(simple_field_chain2_1.SimpleFieldChain2, (0, combi_1.regex)(/^\/?[\w\d]+$/), "/"), (0, combi_1.opt)(length)));
|
|
13
13
|
const at = (0, combi_1.seq)((0, combi_1.opt)("AT"), complex);
|
|
14
14
|
return at;
|
|
15
15
|
}
|
|
@@ -43,10 +43,13 @@ class CreateObject {
|
|
|
43
43
|
if (found instanceof basic_1.VoidType) {
|
|
44
44
|
continue;
|
|
45
45
|
}
|
|
46
|
+
else if (found instanceof basic_1.UnknownType) {
|
|
47
|
+
throw new Error("Target type unknown, " + t.concatTokens());
|
|
48
|
+
}
|
|
46
49
|
else if (!(found instanceof basic_1.ObjectReferenceType)
|
|
47
50
|
&& !(found instanceof basic_1.AnyType)
|
|
48
51
|
&& !(found instanceof basic_1.GenericObjectReferenceType)) {
|
|
49
|
-
throw new Error("Target must be an object reference");
|
|
52
|
+
throw new Error("Target must be an object reference, " + t.concatTokens());
|
|
50
53
|
}
|
|
51
54
|
else if (found instanceof basic_1.GenericObjectReferenceType && type === undefined) {
|
|
52
55
|
throw new Error("Generic type, cannot be instantiated");
|
|
@@ -6,6 +6,8 @@ const source_1 = require("../expressions/source");
|
|
|
6
6
|
const target_1 = require("../expressions/target");
|
|
7
7
|
const dynamic_1 = require("../expressions/dynamic");
|
|
8
8
|
const _type_utils_1 = require("../_type_utils");
|
|
9
|
+
const field_chain_1 = require("../expressions/field_chain");
|
|
10
|
+
const _reference_1 = require("../_reference");
|
|
9
11
|
class Write {
|
|
10
12
|
runSyntax(node, scope, filename) {
|
|
11
13
|
// todo, more
|
|
@@ -18,6 +20,9 @@ class Write {
|
|
|
18
20
|
throw new Error("Source not character like");
|
|
19
21
|
}
|
|
20
22
|
}
|
|
23
|
+
for (const s of node.findAllExpressions(Expressions.SimpleFieldChain2)) {
|
|
24
|
+
new field_chain_1.FieldChain().runSyntax(s, scope, filename, _reference_1.ReferenceType.DataReadReference);
|
|
25
|
+
}
|
|
21
26
|
for (const s of node.findAllExpressions(Expressions.Dynamic)) {
|
|
22
27
|
new dynamic_1.Dynamic().runSyntax(s, scope, filename);
|
|
23
28
|
}
|
package/build/src/registry.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/core",
|
|
3
|
-
"version": "2.95.
|
|
3
|
+
"version": "2.95.15",
|
|
4
4
|
"description": "abaplint - Core API",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/abaplint.d.ts",
|
|
@@ -47,12 +47,12 @@
|
|
|
47
47
|
},
|
|
48
48
|
"homepage": "https://abaplint.org",
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@microsoft/api-extractor": "^7.34.
|
|
50
|
+
"@microsoft/api-extractor": "^7.34.4",
|
|
51
51
|
"@types/chai": "^4.3.4",
|
|
52
52
|
"@types/mocha": "^10.0.1",
|
|
53
|
-
"@types/node": "^18.
|
|
53
|
+
"@types/node": "^18.13.0",
|
|
54
54
|
"chai": "^4.3.7",
|
|
55
|
-
"eslint": "^8.
|
|
55
|
+
"eslint": "^8.34.0",
|
|
56
56
|
"mocha": "^10.2.0",
|
|
57
57
|
"c8": "^7.12.0",
|
|
58
58
|
"source-map-support": "^0.5.21",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"typescript": "^4.9.5"
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"fast-xml-parser": "^4.1.
|
|
63
|
+
"fast-xml-parser": "^4.1.2",
|
|
64
64
|
"json5": "^2.2.3",
|
|
65
65
|
"vscode-languageserver-types": "^3.17.2"
|
|
66
66
|
}
|