@abaplint/core 2.101.14 → 2.101.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 +20 -1
- package/build/adhoc/syntax_performance.d.ts +1 -0
- package/build/adhoc/syntax_performance.js +15 -0
- package/build/adhoc/typed_array.d.ts +20 -0
- package/build/adhoc/typed_array.js +47 -0
- package/build/src/abap/5_syntax/_builtin.js +173 -173
- package/build/src/abap/5_syntax/_type_utils.js +2 -1
- package/build/src/abap/5_syntax/basic_types.js +9 -3
- package/build/src/abap/5_syntax/expressions/constant.js +4 -3
- package/build/src/abap/5_syntax/expressions/inline_loop_definition.js +1 -1
- package/build/src/abap/5_syntax/expressions/method_call_param.js +1 -1
- package/build/src/abap/5_syntax/expressions/method_param.js +3 -0
- package/build/src/abap/5_syntax/expressions/source.js +2 -2
- package/build/src/abap/5_syntax/expressions/string_template.js +2 -2
- package/build/src/abap/5_syntax/statements/concatenate.js +26 -4
- package/build/src/abap/5_syntax/statements/controls.js +6 -6
- package/build/src/abap/5_syntax/statements/describe.js +3 -3
- package/build/src/abap/5_syntax/statements/find.js +10 -10
- package/build/src/abap/5_syntax/statements/get_bit.js +1 -1
- package/build/src/abap/5_syntax/statements/get_run_time.js +1 -1
- package/build/src/abap/5_syntax/statements/message.js +1 -1
- package/build/src/abap/5_syntax/statements/read_table.js +2 -2
- package/build/src/abap/5_syntax/statements/split.js +1 -1
- package/build/src/abap/5_syntax/structures/type_enum.js +2 -2
- package/build/src/abap/types/basic/hex_type.js +1 -1
- package/build/src/abap/types/basic/index.js +1 -0
- package/build/src/abap/types/basic/integer_type.js +19 -0
- package/build/src/abap/types/basic/string_type.js +19 -0
- package/build/src/abap/types/basic/xgeneric_type.js +23 -0
- package/build/src/ddic.js +5 -4
- package/build/src/registry.js +1 -1
- package/build/src/rules/align_parameters.js +17 -2
- package/build/src/rules/downport.js +4 -0
- package/build/src/rules/fully_type_itabs.js +2 -2
- package/build/src/rules/select_single_full_key.js +1 -2
- package/package.json +4 -2
package/build/abaplint.d.ts
CHANGED
|
@@ -94,7 +94,7 @@ declare abstract class AbstractObject implements IObject {
|
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
export declare abstract class AbstractType {
|
|
97
|
-
|
|
97
|
+
protected readonly data: AbstractTypeData | undefined;
|
|
98
98
|
constructor(input?: AbstractTypeData);
|
|
99
99
|
getAbstractTypeData(): AbstractTypeData | undefined;
|
|
100
100
|
/** fully qualified symbolic name of the type */
|
|
@@ -441,6 +441,7 @@ declare namespace BasicTypes {
|
|
|
441
441
|
UnknownType,
|
|
442
442
|
UTCLongType,
|
|
443
443
|
VoidType,
|
|
444
|
+
XGenericType,
|
|
444
445
|
XSequenceType,
|
|
445
446
|
XStringType
|
|
446
447
|
}
|
|
@@ -3350,6 +3351,11 @@ declare class Integer8Type extends AbstractType {
|
|
|
3350
3351
|
}
|
|
3351
3352
|
|
|
3352
3353
|
declare class IntegerType extends AbstractType {
|
|
3354
|
+
private static readonly singleton;
|
|
3355
|
+
static get(input?: AbstractTypeData): IntegerType;
|
|
3356
|
+
private constructor();
|
|
3357
|
+
/** fully qualified symbolic name of the type */
|
|
3358
|
+
getQualifiedName(): string | undefined;
|
|
3353
3359
|
toText(): string;
|
|
3354
3360
|
isGeneric(): boolean;
|
|
3355
3361
|
toABAP(): string;
|
|
@@ -5865,6 +5871,11 @@ declare class StringToken extends Token {
|
|
|
5865
5871
|
}
|
|
5866
5872
|
|
|
5867
5873
|
declare class StringType extends AbstractType {
|
|
5874
|
+
private static readonly singleton;
|
|
5875
|
+
static get(input?: AbstractTypeData): StringType;
|
|
5876
|
+
private constructor();
|
|
5877
|
+
/** fully qualified symbolic name of the type */
|
|
5878
|
+
getQualifiedName(): string | undefined;
|
|
5868
5879
|
toText(): string;
|
|
5869
5880
|
isGeneric(): boolean;
|
|
5870
5881
|
toABAP(): string;
|
|
@@ -6783,6 +6794,14 @@ declare class WStaticArrowW extends Token {
|
|
|
6783
6794
|
static railroad(): string;
|
|
6784
6795
|
}
|
|
6785
6796
|
|
|
6797
|
+
declare class XGenericType extends AbstractType {
|
|
6798
|
+
toText(): string;
|
|
6799
|
+
isGeneric(): boolean;
|
|
6800
|
+
toABAP(): string;
|
|
6801
|
+
containsVoid(): boolean;
|
|
6802
|
+
toCDS(): string;
|
|
6803
|
+
}
|
|
6804
|
+
|
|
6786
6805
|
declare class XSequenceType extends AbstractType {
|
|
6787
6806
|
toText(): string;
|
|
6788
6807
|
isGeneric(): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const src_1 = require("../src");
|
|
4
|
+
const fs = require("fs");
|
|
5
|
+
console.log("========================");
|
|
6
|
+
const file1 = new src_1.MemoryFile("abapgit.prog.abap", fs.readFileSync("./lexer_performance.abap", "utf-8"));
|
|
7
|
+
// TODO, it needs the deps to give a correct result TODO
|
|
8
|
+
const reg = new src_1.Registry().addFile(file1).parse();
|
|
9
|
+
console.log("run syntax logc,");
|
|
10
|
+
const before = Date.now();
|
|
11
|
+
const res = new src_1.SyntaxLogic(reg, reg.getFirstObject()).run();
|
|
12
|
+
console.dir(res.issues);
|
|
13
|
+
const runtime = Date.now() - before;
|
|
14
|
+
console.log("Total: " + runtime + "ms");
|
|
15
|
+
//# sourceMappingURL=syntax_performance.js.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
declare class Token {
|
|
2
|
+
private readonly col;
|
|
3
|
+
private readonly row;
|
|
4
|
+
private readonly type;
|
|
5
|
+
private readonly str;
|
|
6
|
+
constructor(col: number, row: number, type: number, str: string);
|
|
7
|
+
get(): {
|
|
8
|
+
a: number;
|
|
9
|
+
b: number;
|
|
10
|
+
c: number;
|
|
11
|
+
d: string;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
declare class TokensMemory {
|
|
15
|
+
private readonly strings;
|
|
16
|
+
private readonly memory;
|
|
17
|
+
private length;
|
|
18
|
+
add(col: number, row: number, type: number, str: string): void;
|
|
19
|
+
}
|
|
20
|
+
declare const count = 5000000;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
class Token {
|
|
3
|
+
constructor(col, row, type, str) {
|
|
4
|
+
this.col = col;
|
|
5
|
+
this.row = row;
|
|
6
|
+
this.type = type;
|
|
7
|
+
this.str = str;
|
|
8
|
+
}
|
|
9
|
+
get() {
|
|
10
|
+
return { a: this.col, b: this.row, c: this.type, d: this.str };
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
class TokensMemory {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.strings = [];
|
|
16
|
+
this.memory = new Int32Array();
|
|
17
|
+
this.length = 0;
|
|
18
|
+
}
|
|
19
|
+
add(col, row, type, str) {
|
|
20
|
+
this.memory[0 + this.length] = col;
|
|
21
|
+
this.memory[1 + this.length] = row;
|
|
22
|
+
this.memory[2 + this.length] = type;
|
|
23
|
+
this.memory[3 + this.length] = this.strings.length;
|
|
24
|
+
this.strings.push(str);
|
|
25
|
+
this.length++;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
const count = 5000000;
|
|
29
|
+
{
|
|
30
|
+
const start = Date.now();
|
|
31
|
+
const mem = new TokensMemory();
|
|
32
|
+
for (let i = 0; i < count; i++) {
|
|
33
|
+
mem.add(i, i, i, "dfs" + i);
|
|
34
|
+
}
|
|
35
|
+
const runtime = Date.now() - start;
|
|
36
|
+
console.log("Typed Array: " + runtime + "ms");
|
|
37
|
+
}
|
|
38
|
+
{
|
|
39
|
+
const start = Date.now();
|
|
40
|
+
const tokens = [];
|
|
41
|
+
for (let i = 0; i < count; i++) {
|
|
42
|
+
tokens.push(new Token(i, i, i, "dfs" + i));
|
|
43
|
+
}
|
|
44
|
+
const runtime = Date.now() - start;
|
|
45
|
+
console.log("Objects: " + runtime + "ms");
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=typed_array.js.map
|