@abaplint/core 2.94.14 → 2.94.16
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/field_length.js +1 -2
- package/build/src/abap/2_statements/expressions/field_offset.js +1 -2
- package/build/src/abap/2_statements/expressions/index.js +1 -0
- package/build/src/abap/2_statements/expressions/simple_field_chain2.js +20 -0
- package/build/src/abap/5_syntax/expressions/field_length.js +3 -12
- package/build/src/abap/5_syntax/expressions/field_offset.js +3 -12
- package/build/src/abap/5_syntax/statements/read_textpool.js +18 -0
- package/build/src/abap/5_syntax/syntax.js +2 -0
- package/build/src/registry.js +1 -1
- package/package.json +2 -2
package/build/abaplint.d.ts
CHANGED
|
@@ -2031,6 +2031,7 @@ declare namespace Expressions {
|
|
|
2031
2031
|
SelectLoop_2 as SelectLoop,
|
|
2032
2032
|
Select_3 as Select,
|
|
2033
2033
|
SimpleFieldChain,
|
|
2034
|
+
SimpleFieldChain2,
|
|
2034
2035
|
SimpleName,
|
|
2035
2036
|
SimpleSource1,
|
|
2036
2037
|
SimpleSource2,
|
|
@@ -5019,6 +5020,10 @@ declare class SimpleFieldChain extends Expression {
|
|
|
5019
5020
|
getRunnable(): IStatementRunnable;
|
|
5020
5021
|
}
|
|
5021
5022
|
|
|
5023
|
+
declare class SimpleFieldChain2 extends Expression {
|
|
5024
|
+
getRunnable(): IStatementRunnable;
|
|
5025
|
+
}
|
|
5026
|
+
|
|
5022
5027
|
declare class SimpleName extends Expression {
|
|
5023
5028
|
getRunnable(): IStatementRunnable;
|
|
5024
5029
|
}
|
|
@@ -6,8 +6,7 @@ const tokens_1 = require("../../1_lexer/tokens");
|
|
|
6
6
|
const _1 = require(".");
|
|
7
7
|
class FieldLength extends combi_1.Expression {
|
|
8
8
|
getRunnable() {
|
|
9
|
-
const
|
|
10
|
-
const normal = (0, combi_1.seq)((0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.Plus)), (0, combi_1.altPrio)((0, combi_1.regex)(/^\d+$/), named));
|
|
9
|
+
const normal = (0, combi_1.seq)((0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.Plus)), (0, combi_1.altPrio)((0, combi_1.regex)(/^\d+$/), _1.SimpleFieldChain2));
|
|
11
10
|
const length = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.ParenLeft), (0, combi_1.altPrio)(normal, "*"), (0, combi_1.tok)(tokens_1.ParenRightW));
|
|
12
11
|
return length;
|
|
13
12
|
}
|
|
@@ -6,8 +6,7 @@ const tokens_1 = require("../../1_lexer/tokens");
|
|
|
6
6
|
const _1 = require(".");
|
|
7
7
|
class FieldOffset extends combi_1.Expression {
|
|
8
8
|
getRunnable() {
|
|
9
|
-
const
|
|
10
|
-
const offset = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.Plus), (0, combi_1.altPrio)((0, combi_1.regex)(/^\d+$/), named));
|
|
9
|
+
const offset = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.Plus), (0, combi_1.altPrio)((0, combi_1.regex)(/^\d+$/), _1.SimpleFieldChain2));
|
|
11
10
|
return offset;
|
|
12
11
|
}
|
|
13
12
|
}
|
|
@@ -155,6 +155,7 @@ __exportStar(require("./report_name"), exports);
|
|
|
155
155
|
__exportStar(require("./select_loop"), exports);
|
|
156
156
|
__exportStar(require("./select"), exports);
|
|
157
157
|
__exportStar(require("./simple_field_chain"), exports);
|
|
158
|
+
__exportStar(require("./simple_field_chain2"), exports);
|
|
158
159
|
__exportStar(require("./simple_name"), exports);
|
|
159
160
|
__exportStar(require("./simple_source1"), exports);
|
|
160
161
|
__exportStar(require("./simple_source2"), exports);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SimpleFieldChain2 = void 0;
|
|
4
|
+
const combi_1 = require("../combi");
|
|
5
|
+
const _1 = require(".");
|
|
6
|
+
const tokens_1 = require("../../1_lexer/tokens");
|
|
7
|
+
const attribute_name_1 = require("./attribute_name");
|
|
8
|
+
class SimpleFieldChain2 extends combi_1.Expression {
|
|
9
|
+
getRunnable() {
|
|
10
|
+
const attr = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.InstanceArrow), attribute_name_1.AttributeName);
|
|
11
|
+
const comp = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.Dash), _1.ComponentName);
|
|
12
|
+
const chain = (0, combi_1.star)((0, combi_1.altPrio)(attr, comp));
|
|
13
|
+
const clas = (0, combi_1.seq)(_1.ClassName, (0, combi_1.tok)(tokens_1.StaticArrow), attribute_name_1.AttributeName);
|
|
14
|
+
const start = (0, combi_1.altPrio)(clas, _1.SourceField, _1.SourceFieldSymbol);
|
|
15
|
+
const ret = (0, combi_1.seq)(start, chain);
|
|
16
|
+
return ret;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.SimpleFieldChain2 = SimpleFieldChain2;
|
|
20
|
+
//# sourceMappingURL=simple_field_chain2.js.map
|
|
@@ -3,21 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.FieldLength = void 0;
|
|
4
4
|
const Expressions = require("../../2_statements/expressions");
|
|
5
5
|
const _reference_1 = require("../_reference");
|
|
6
|
-
const
|
|
6
|
+
const field_chain_1 = require("./field_chain");
|
|
7
7
|
class FieldLength {
|
|
8
8
|
runSyntax(node, scope, filename) {
|
|
9
|
-
const field = node.findDirectExpression(Expressions.
|
|
9
|
+
const field = node.findDirectExpression(Expressions.SimpleFieldChain2);
|
|
10
10
|
if (field) {
|
|
11
|
-
|
|
12
|
-
const found = scope.findVariable(token.getStr());
|
|
13
|
-
if (found === undefined) {
|
|
14
|
-
throw new Error("\"" + field.getFirstToken().getStr() + "\" not found, FieldLength");
|
|
15
|
-
}
|
|
16
|
-
scope.addReference(token, found, _reference_1.ReferenceType.DataReadReference, filename);
|
|
17
|
-
}
|
|
18
|
-
const symbol = node.findDirectExpression(Expressions.SourceFieldSymbol);
|
|
19
|
-
if (symbol) {
|
|
20
|
-
new source_field_symbol_1.SourceFieldSymbol().runSyntax(symbol, scope, filename);
|
|
11
|
+
new field_chain_1.FieldChain().runSyntax(field, scope, filename, _reference_1.ReferenceType.DataReadReference);
|
|
21
12
|
}
|
|
22
13
|
}
|
|
23
14
|
}
|
|
@@ -3,21 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.FieldOffset = void 0;
|
|
4
4
|
const Expressions = require("../../2_statements/expressions");
|
|
5
5
|
const _reference_1 = require("../_reference");
|
|
6
|
-
const
|
|
6
|
+
const field_chain_1 = require("./field_chain");
|
|
7
7
|
class FieldOffset {
|
|
8
8
|
runSyntax(node, scope, filename) {
|
|
9
|
-
const field = node.findDirectExpression(Expressions.
|
|
9
|
+
const field = node.findDirectExpression(Expressions.SimpleFieldChain2);
|
|
10
10
|
if (field) {
|
|
11
|
-
|
|
12
|
-
const found = scope.findVariable(token.getStr());
|
|
13
|
-
if (found === undefined) {
|
|
14
|
-
throw new Error("\"" + field.getFirstToken().getStr() + "\" not found, FieldOffset");
|
|
15
|
-
}
|
|
16
|
-
scope.addReference(token, found, _reference_1.ReferenceType.DataReadReference, filename);
|
|
17
|
-
}
|
|
18
|
-
const symbol = node.findDirectExpression(Expressions.SourceFieldSymbol);
|
|
19
|
-
if (symbol) {
|
|
20
|
-
new source_field_symbol_1.SourceFieldSymbol().runSyntax(symbol, scope, filename);
|
|
11
|
+
new field_chain_1.FieldChain().runSyntax(field, scope, filename, _reference_1.ReferenceType.DataReadReference);
|
|
21
12
|
}
|
|
22
13
|
}
|
|
23
14
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ReadTextpool = void 0;
|
|
4
|
+
const Expressions = require("../../2_statements/expressions");
|
|
5
|
+
const source_1 = require("../expressions/source");
|
|
6
|
+
const target_1 = require("../expressions/target");
|
|
7
|
+
class ReadTextpool {
|
|
8
|
+
runSyntax(node, scope, filename) {
|
|
9
|
+
for (const s of node.findDirectExpressions(Expressions.Source)) {
|
|
10
|
+
new source_1.Source().runSyntax(s, scope, filename);
|
|
11
|
+
}
|
|
12
|
+
for (const t of node.findDirectExpressions(Expressions.Target)) {
|
|
13
|
+
new target_1.Target().runSyntax(t, scope, filename);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.ReadTextpool = ReadTextpool;
|
|
18
|
+
//# sourceMappingURL=read_textpool.js.map
|
|
@@ -46,6 +46,7 @@ const split_1 = require("./statements/split");
|
|
|
46
46
|
const assign_1 = require("./statements/assign");
|
|
47
47
|
const convert_1 = require("./statements/convert");
|
|
48
48
|
const describe_1 = require("./statements/describe");
|
|
49
|
+
const read_textpool_1 = require("./statements/read_textpool");
|
|
49
50
|
const find_1 = require("./statements/find");
|
|
50
51
|
const message_1 = require("./statements/message");
|
|
51
52
|
const get_time_1 = require("./statements/get_time");
|
|
@@ -264,6 +265,7 @@ if (Object.keys(map).length === 0) {
|
|
|
264
265
|
addToMap(new search_1.Search());
|
|
265
266
|
addToMap(new translate_1.Translate());
|
|
266
267
|
addToMap(new modify_internal_1.ModifyInternal());
|
|
268
|
+
addToMap(new read_textpool_1.ReadTextpool());
|
|
267
269
|
}
|
|
268
270
|
// -----------------------------------
|
|
269
271
|
class SyntaxLogic {
|
package/build/src/registry.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/core",
|
|
3
|
-
"version": "2.94.
|
|
3
|
+
"version": "2.94.16",
|
|
4
4
|
"description": "abaplint - Core API",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/abaplint.d.ts",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
63
|
"fast-xml-parser": "^4.0.12",
|
|
64
|
-
"json5": "^2.2.
|
|
64
|
+
"json5": "^2.2.3",
|
|
65
65
|
"vscode-languageserver-types": "^3.17.2"
|
|
66
66
|
}
|
|
67
67
|
}
|