@abaplint/core 2.113.125 → 2.113.127
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 +18 -3
- package/build/src/abap/5_syntax/_builtin.js +10 -10
- package/build/src/abap/5_syntax/_current_scope.js +13 -0
- package/build/src/abap/5_syntax/_procedural.js +2 -2
- package/build/src/abap/5_syntax/_type_utils.js +13 -7
- package/build/src/abap/5_syntax/basic_types.js +11 -11
- package/build/src/abap/5_syntax/expressions/attribute_chain.js +5 -5
- package/build/src/abap/5_syntax/expressions/attribute_name.js +6 -6
- package/build/src/abap/5_syntax/expressions/cast.js +9 -9
- package/build/src/abap/5_syntax/expressions/compare.js +4 -4
- package/build/src/abap/5_syntax/expressions/component_chain.js +8 -8
- package/build/src/abap/5_syntax/expressions/component_compare.js +3 -3
- package/build/src/abap/5_syntax/expressions/component_compare_simple.js +3 -3
- package/build/src/abap/5_syntax/expressions/component_cond.js +3 -3
- package/build/src/abap/5_syntax/expressions/component_name.js +4 -4
- package/build/src/abap/5_syntax/expressions/cond.js +3 -3
- package/build/src/abap/5_syntax/expressions/cond_body.js +5 -5
- package/build/src/abap/5_syntax/expressions/constant.js +1 -1
- package/build/src/abap/5_syntax/expressions/conv_body.js +4 -4
- package/build/src/abap/5_syntax/expressions/corresponding_body.js +3 -3
- package/build/src/abap/5_syntax/expressions/data_definition.js +3 -4
- package/build/src/abap/5_syntax/expressions/database_table.js +1 -1
- package/build/src/abap/5_syntax/expressions/default.js +3 -3
- package/build/src/abap/5_syntax/expressions/dereference.js +2 -2
- package/build/src/abap/5_syntax/expressions/dynamic.js +2 -2
- package/build/src/abap/5_syntax/expressions/field_assignment.js +2 -2
- package/build/src/abap/5_syntax/expressions/field_chain.js +19 -19
- package/build/src/abap/5_syntax/expressions/field_length.js +2 -2
- package/build/src/abap/5_syntax/expressions/field_offset.js +2 -2
- package/build/src/abap/5_syntax/expressions/filter_body.js +3 -3
- package/build/src/abap/5_syntax/expressions/for.js +8 -8
- package/build/src/abap/5_syntax/expressions/form_param.js +2 -2
- package/build/src/abap/5_syntax/expressions/fstarget.js +2 -2
- package/build/src/abap/5_syntax/expressions/inline_data.js +1 -1
- package/build/src/abap/5_syntax/expressions/inline_field_definition.js +3 -3
- package/build/src/abap/5_syntax/expressions/inline_fs.js +1 -1
- package/build/src/abap/5_syntax/expressions/inline_loop_definition.js +2 -2
- package/build/src/abap/5_syntax/expressions/let.js +2 -2
- package/build/src/abap/5_syntax/expressions/loop_group_by.js +6 -6
- package/build/src/abap/5_syntax/expressions/message_source.js +2 -2
- package/build/src/abap/5_syntax/expressions/method_call_body.js +3 -3
- package/build/src/abap/5_syntax/expressions/method_call_chain.js +14 -14
- package/build/src/abap/5_syntax/expressions/method_call_param.js +2 -2
- package/build/src/abap/5_syntax/expressions/method_def_returning.js +1 -1
- package/build/src/abap/5_syntax/expressions/method_param.js +4 -4
- package/build/src/abap/5_syntax/expressions/method_parameters.js +7 -7
- package/build/src/abap/5_syntax/expressions/method_source.js +20 -20
- package/build/src/abap/5_syntax/expressions/new_object.js +10 -10
- package/build/src/abap/5_syntax/expressions/raise_with.js +2 -2
- package/build/src/abap/5_syntax/expressions/reduce_body.js +7 -7
- package/build/src/abap/5_syntax/expressions/reduce_next.js +3 -3
- package/build/src/abap/5_syntax/expressions/select.js +25 -25
- package/build/src/abap/5_syntax/expressions/select_loop.js +2 -2
- package/build/src/abap/5_syntax/expressions/source.js +30 -30
- package/build/src/abap/5_syntax/expressions/source_field.js +2 -2
- package/build/src/abap/5_syntax/expressions/source_field_symbol.js +2 -2
- package/build/src/abap/5_syntax/expressions/sql_compare.js +6 -6
- package/build/src/abap/5_syntax/expressions/sql_for_all_entries.js +2 -2
- package/build/src/abap/5_syntax/expressions/sql_from.js +3 -3
- package/build/src/abap/5_syntax/expressions/sql_in.js +4 -4
- package/build/src/abap/5_syntax/expressions/sql_order_by.js +2 -2
- package/build/src/abap/5_syntax/expressions/sql_source.js +3 -3
- package/build/src/abap/5_syntax/expressions/string_template.js +6 -6
- package/build/src/abap/5_syntax/expressions/switch_body.js +4 -4
- package/build/src/abap/5_syntax/expressions/table_expression.js +2 -2
- package/build/src/abap/5_syntax/expressions/target.js +19 -19
- package/build/src/abap/5_syntax/expressions/type_table.js +2 -2
- package/build/src/abap/5_syntax/expressions/type_table_key.js +1 -1
- package/build/src/abap/5_syntax/expressions/value_body.js +10 -10
- package/build/src/abap/5_syntax/statements/add.js +2 -2
- package/build/src/abap/5_syntax/statements/add_corresponding.js +2 -2
- package/build/src/abap/5_syntax/statements/append.js +6 -6
- package/build/src/abap/5_syntax/statements/assert.js +1 -1
- package/build/src/abap/5_syntax/statements/assign.js +8 -8
- package/build/src/abap/5_syntax/statements/authority_check.js +1 -1
- package/build/src/abap/5_syntax/statements/call.js +3 -3
- package/build/src/abap/5_syntax/statements/call_badi.js +3 -3
- package/build/src/abap/5_syntax/statements/call_function.js +6 -6
- package/build/src/abap/5_syntax/statements/call_kernel.js +1 -1
- package/build/src/abap/5_syntax/statements/call_transaction.js +2 -2
- package/build/src/abap/5_syntax/statements/call_transformation.js +4 -4
- package/build/src/abap/5_syntax/statements/case.js +1 -1
- package/build/src/abap/5_syntax/statements/case_type.js +1 -1
- package/build/src/abap/5_syntax/statements/catch.js +2 -2
- package/build/src/abap/5_syntax/statements/check.js +1 -1
- package/build/src/abap/5_syntax/statements/class_data.js +2 -2
- package/build/src/abap/5_syntax/statements/class_implementation.js +1 -1
- package/build/src/abap/5_syntax/statements/clear.js +2 -2
- package/build/src/abap/5_syntax/statements/close_dataset.js +1 -1
- package/build/src/abap/5_syntax/statements/collect.js +3 -3
- package/build/src/abap/5_syntax/statements/commit_entities.js +3 -3
- package/build/src/abap/5_syntax/statements/concatenate.js +5 -5
- package/build/src/abap/5_syntax/statements/condense.js +1 -1
- package/build/src/abap/5_syntax/statements/convert.js +7 -7
- package/build/src/abap/5_syntax/statements/create_data.js +3 -3
- package/build/src/abap/5_syntax/statements/create_object.js +9 -6
- package/build/src/abap/5_syntax/statements/data.js +2 -2
- package/build/src/abap/5_syntax/statements/delete_cluster.js +1 -1
- package/build/src/abap/5_syntax/statements/delete_database.js +4 -4
- package/build/src/abap/5_syntax/statements/delete_internal.js +4 -4
- package/build/src/abap/5_syntax/statements/delete_memory.js +1 -1
- package/build/src/abap/5_syntax/statements/delete_report.js +1 -1
- package/build/src/abap/5_syntax/statements/describe.js +10 -10
- package/build/src/abap/5_syntax/statements/divide.js +2 -2
- package/build/src/abap/5_syntax/statements/do.js +2 -2
- package/build/src/abap/5_syntax/statements/editor_call.js +2 -2
- package/build/src/abap/5_syntax/statements/else_if.js +1 -1
- package/build/src/abap/5_syntax/statements/export.js +2 -2
- package/build/src/abap/5_syntax/statements/find.js +5 -5
- package/build/src/abap/5_syntax/statements/format.js +1 -1
- package/build/src/abap/5_syntax/statements/get_badi.js +3 -3
- package/build/src/abap/5_syntax/statements/get_bit.js +3 -3
- package/build/src/abap/5_syntax/statements/get_cursor.js +1 -1
- package/build/src/abap/5_syntax/statements/get_locale.js +2 -2
- package/build/src/abap/5_syntax/statements/get_parameter.js +3 -3
- package/build/src/abap/5_syntax/statements/get_reference.js +3 -3
- package/build/src/abap/5_syntax/statements/get_run_time.js +2 -2
- package/build/src/abap/5_syntax/statements/get_time.js +2 -2
- package/build/src/abap/5_syntax/statements/if.js +1 -1
- package/build/src/abap/5_syntax/statements/import.js +2 -2
- package/build/src/abap/5_syntax/statements/import_dynpro.js +2 -2
- package/build/src/abap/5_syntax/statements/include_type.js +2 -2
- package/build/src/abap/5_syntax/statements/insert_database.js +4 -4
- package/build/src/abap/5_syntax/statements/insert_field_group.js +3 -3
- package/build/src/abap/5_syntax/statements/insert_internal.js +7 -7
- package/build/src/abap/5_syntax/statements/insert_report.js +1 -1
- package/build/src/abap/5_syntax/statements/insert_textpool.js +1 -1
- package/build/src/abap/5_syntax/statements/log_point.js +1 -1
- package/build/src/abap/5_syntax/statements/loop.js +10 -10
- package/build/src/abap/5_syntax/statements/loop_at_screen.js +2 -2
- package/build/src/abap/5_syntax/statements/message.js +5 -5
- package/build/src/abap/5_syntax/statements/modify_database.js +5 -5
- package/build/src/abap/5_syntax/statements/modify_entities.js +3 -3
- package/build/src/abap/5_syntax/statements/modify_internal.js +4 -4
- package/build/src/abap/5_syntax/statements/modify_screen.js +1 -1
- package/build/src/abap/5_syntax/statements/move.js +4 -4
- package/build/src/abap/5_syntax/statements/move_corresponding.js +2 -2
- package/build/src/abap/5_syntax/statements/multiply.js +2 -2
- package/build/src/abap/5_syntax/statements/open_dataset.js +2 -2
- package/build/src/abap/5_syntax/statements/pack.js +2 -2
- package/build/src/abap/5_syntax/statements/parameter.js +1 -1
- package/build/src/abap/5_syntax/statements/perform.js +4 -4
- package/build/src/abap/5_syntax/statements/raise.js +8 -8
- package/build/src/abap/5_syntax/statements/raise_event.js +1 -1
- package/build/src/abap/5_syntax/statements/read_entities.js +3 -3
- package/build/src/abap/5_syntax/statements/read_report.js +2 -2
- package/build/src/abap/5_syntax/statements/read_table.js +8 -8
- package/build/src/abap/5_syntax/statements/read_textpool.js +2 -2
- package/build/src/abap/5_syntax/statements/receive.js +2 -2
- package/build/src/abap/5_syntax/statements/replace.js +2 -2
- package/build/src/abap/5_syntax/statements/scan.js +2 -2
- package/build/src/abap/5_syntax/statements/search.js +1 -1
- package/build/src/abap/5_syntax/statements/select.js +1 -1
- package/build/src/abap/5_syntax/statements/select_loop.js +1 -1
- package/build/src/abap/5_syntax/statements/selectoption.js +4 -4
- package/build/src/abap/5_syntax/statements/set_bit.js +2 -2
- package/build/src/abap/5_syntax/statements/set_handler.js +2 -2
- package/build/src/abap/5_syntax/statements/set_locale.js +2 -2
- package/build/src/abap/5_syntax/statements/set_parameter.js +1 -1
- package/build/src/abap/5_syntax/statements/set_pf_status.js +1 -1
- package/build/src/abap/5_syntax/statements/set_titlebar.js +1 -1
- package/build/src/abap/5_syntax/statements/shift.js +2 -2
- package/build/src/abap/5_syntax/statements/sort.js +2 -2
- package/build/src/abap/5_syntax/statements/split.js +3 -3
- package/build/src/abap/5_syntax/statements/static.js +1 -1
- package/build/src/abap/5_syntax/statements/submit.js +3 -3
- package/build/src/abap/5_syntax/statements/subtract.js +2 -2
- package/build/src/abap/5_syntax/statements/subtract_corresponding.js +2 -2
- package/build/src/abap/5_syntax/statements/syntax_check.js +2 -2
- package/build/src/abap/5_syntax/statements/system_call.js +1 -1
- package/build/src/abap/5_syntax/statements/transfer.js +2 -2
- package/build/src/abap/5_syntax/statements/translate.js +2 -2
- package/build/src/abap/5_syntax/statements/truncate_dataset.js +1 -1
- package/build/src/abap/5_syntax/statements/type.js +3 -3
- package/build/src/abap/5_syntax/statements/unpack.js +2 -2
- package/build/src/abap/5_syntax/statements/update_database.js +4 -4
- package/build/src/abap/5_syntax/statements/wait.js +2 -2
- package/build/src/abap/5_syntax/statements/when.js +1 -1
- package/build/src/abap/5_syntax/statements/when_type.js +3 -3
- package/build/src/abap/5_syntax/statements/while.js +3 -3
- package/build/src/abap/5_syntax/statements/with.js +2 -2
- package/build/src/abap/5_syntax/statements/with_loop.js +2 -2
- package/build/src/abap/5_syntax/statements/write.js +4 -4
- package/build/src/abap/5_syntax/structures/data.js +1 -1
- package/build/src/abap/5_syntax/structures/statics.js +1 -1
- package/build/src/abap/types/basic/any_type.js +13 -0
- package/build/src/abap/types/basic/cgeneric_type.js +7 -0
- package/build/src/abap/types/basic/integer_type.js +7 -4
- package/build/src/abap/types/basic/string_type.js +7 -4
- package/build/src/abap/types/basic/void_type.js +10 -0
- package/build/src/abap/types/basic/xgeneric_type.js +7 -0
- package/build/src/abap/types/basic/xstring_type.js +13 -0
- package/build/src/abap/types/event_definition.js +1 -1
- package/build/src/abap/types/form_definition.js +3 -3
- package/build/src/abap/types/method_parameters.js +11 -11
- package/build/src/cds/cds_determine_types.js +5 -5
- package/build/src/ddic.js +11 -11
- package/build/src/objects/authorization_check_field.js +1 -1
- package/build/src/objects/lock_object.js +1 -1
- package/build/src/objects/maintenance_and_transport_object.js +2 -2
- package/build/src/objects/table.js +1 -1
- package/build/src/objects/view.js +1 -1
- package/build/src/registry.js +1 -1
- package/build/src/rules/xml_consistency.js +1 -1
- package/package.json +5 -5
package/build/abaplint.d.ts
CHANGED
|
@@ -172,6 +172,9 @@ declare class Any implements IStructure {
|
|
|
172
172
|
}
|
|
173
173
|
|
|
174
174
|
declare class AnyType extends AbstractType {
|
|
175
|
+
private static readonly singletons;
|
|
176
|
+
static get(input?: AbstractTypeData): AnyType;
|
|
177
|
+
private constructor();
|
|
175
178
|
toText(): string;
|
|
176
179
|
toABAP(): string;
|
|
177
180
|
isGeneric(): boolean;
|
|
@@ -970,6 +973,9 @@ declare class CDSWithParameters extends Expression {
|
|
|
970
973
|
}
|
|
971
974
|
|
|
972
975
|
declare class CGenericType extends AbstractType {
|
|
976
|
+
private static readonly singleton;
|
|
977
|
+
static get(): CGenericType;
|
|
978
|
+
private constructor();
|
|
973
979
|
toText(): string;
|
|
974
980
|
isGeneric(): boolean;
|
|
975
981
|
toABAP(): string;
|
|
@@ -1506,6 +1512,7 @@ export declare class CurrentScope {
|
|
|
1506
1512
|
getType(): ScopeType;
|
|
1507
1513
|
push(stype: ScopeType, sname: string, start: Position, filename: string): void;
|
|
1508
1514
|
isOO(): boolean;
|
|
1515
|
+
isAnyOO(): boolean;
|
|
1509
1516
|
isGlobalOO(): boolean;
|
|
1510
1517
|
isTypePool(): boolean;
|
|
1511
1518
|
setAllowHeaderUse(name: string): void;
|
|
@@ -3694,7 +3701,7 @@ declare class Integer8Type extends AbstractType {
|
|
|
3694
3701
|
}
|
|
3695
3702
|
|
|
3696
3703
|
declare class IntegerType extends AbstractType {
|
|
3697
|
-
private static readonly
|
|
3704
|
+
private static readonly singletons;
|
|
3698
3705
|
static get(input?: AbstractTypeData): IntegerType;
|
|
3699
3706
|
private constructor();
|
|
3700
3707
|
/** fully qualified symbolic name of the type */
|
|
@@ -6625,7 +6632,7 @@ declare class StringToken extends Token {
|
|
|
6625
6632
|
}
|
|
6626
6633
|
|
|
6627
6634
|
declare class StringType extends AbstractType {
|
|
6628
|
-
private static readonly
|
|
6635
|
+
private static readonly singletons;
|
|
6629
6636
|
static get(input?: AbstractTypeData): StringType;
|
|
6630
6637
|
private constructor();
|
|
6631
6638
|
/** fully qualified symbolic name of the type */
|
|
@@ -7396,8 +7403,10 @@ export declare enum Visibility {
|
|
|
7396
7403
|
}
|
|
7397
7404
|
|
|
7398
7405
|
declare class VoidType extends AbstractType {
|
|
7406
|
+
private static readonly singletons;
|
|
7407
|
+
static get(voided: string | undefined, qualifiedName?: string): VoidType;
|
|
7399
7408
|
private readonly voided;
|
|
7400
|
-
constructor(
|
|
7409
|
+
private constructor();
|
|
7401
7410
|
getVoided(): string | undefined;
|
|
7402
7411
|
toABAP(): string;
|
|
7403
7412
|
toText(): string;
|
|
@@ -7597,6 +7606,9 @@ declare class WStaticArrowW extends Token {
|
|
|
7597
7606
|
}
|
|
7598
7607
|
|
|
7599
7608
|
declare class XGenericType extends AbstractType {
|
|
7609
|
+
private static readonly singleton;
|
|
7610
|
+
static get(): XGenericType;
|
|
7611
|
+
private constructor();
|
|
7600
7612
|
toText(): string;
|
|
7601
7613
|
isGeneric(): boolean;
|
|
7602
7614
|
toABAP(): string;
|
|
@@ -7613,6 +7625,9 @@ declare class XSequenceType extends AbstractType {
|
|
|
7613
7625
|
}
|
|
7614
7626
|
|
|
7615
7627
|
declare class XStringType extends AbstractType {
|
|
7628
|
+
private static readonly singletons;
|
|
7629
|
+
static get(input?: AbstractTypeData): XStringType;
|
|
7630
|
+
private constructor();
|
|
7616
7631
|
toText(): string;
|
|
7617
7632
|
isGeneric(): boolean;
|
|
7618
7633
|
toABAP(): string;
|
|
@@ -167,14 +167,14 @@ class BuiltIn {
|
|
|
167
167
|
ret.push(...BuiltIn.getCache);
|
|
168
168
|
for (const e of extras) {
|
|
169
169
|
const id = new tokens_1.Identifier(new position_1.Position(this.row++, 1), e);
|
|
170
|
-
ret.push(new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename,
|
|
170
|
+
ret.push(new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, basic_1.VoidType.get(e), ["read_only" /* IdentifierMeta.ReadOnly */, "built-in" /* IdentifierMeta.BuiltIn */], "'?'"));
|
|
171
171
|
}
|
|
172
172
|
return ret;
|
|
173
173
|
}
|
|
174
174
|
/////////////////////////////
|
|
175
175
|
buildVariable(name) {
|
|
176
176
|
const id = new tokens_1.Identifier(new position_1.Position(this.row++, 1), name);
|
|
177
|
-
return new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename,
|
|
177
|
+
return new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, basic_1.VoidType.get(name), ["built-in" /* IdentifierMeta.BuiltIn */]);
|
|
178
178
|
}
|
|
179
179
|
buildSY() {
|
|
180
180
|
const components = [];
|
|
@@ -226,7 +226,7 @@ class BuiltIn {
|
|
|
226
226
|
components.push({ name: "dayst", type: new basic_1.CharacterType(1) });
|
|
227
227
|
components.push({ name: "ftype", type: new basic_1.CharacterType(1) });
|
|
228
228
|
components.push({ name: "appli", type: new basic_1.HexType(2) });
|
|
229
|
-
components.push({ name: "fdayw", type:
|
|
229
|
+
components.push({ name: "fdayw", type: basic_1.AnyType.get() });
|
|
230
230
|
components.push({ name: "ccurs", type: new basic_1.PackedType(5, 0) });
|
|
231
231
|
components.push({ name: "ccurt", type: new basic_1.PackedType(5, 0) });
|
|
232
232
|
components.push({ name: "debug", type: new basic_1.CharacterType(1) });
|
|
@@ -363,7 +363,7 @@ class BuiltIn {
|
|
|
363
363
|
buildConstant(name, type, value) {
|
|
364
364
|
const id = new tokens_1.Identifier(new position_1.Position(this.row++, 1), name);
|
|
365
365
|
if (type === undefined) {
|
|
366
|
-
type =
|
|
366
|
+
type = basic_1.VoidType.get(name);
|
|
367
367
|
}
|
|
368
368
|
if (value === undefined) {
|
|
369
369
|
value = "'?'";
|
|
@@ -411,7 +411,7 @@ BuiltIn.methods = {
|
|
|
411
411
|
mandatory: {
|
|
412
412
|
"val": basic_1.IntegerType.get(),
|
|
413
413
|
},
|
|
414
|
-
return:
|
|
414
|
+
return: basic_1.XStringType.get(),
|
|
415
415
|
version: version_1.Version.v702,
|
|
416
416
|
},
|
|
417
417
|
"BOOLC": {
|
|
@@ -430,7 +430,7 @@ BuiltIn.methods = {
|
|
|
430
430
|
optional: {
|
|
431
431
|
"bit": basic_1.IntegerType.get(),
|
|
432
432
|
},
|
|
433
|
-
return:
|
|
433
|
+
return: basic_1.XStringType.get(),
|
|
434
434
|
version: version_1.Version.v702,
|
|
435
435
|
},
|
|
436
436
|
"CEIL": {
|
|
@@ -496,7 +496,7 @@ BuiltIn.methods = {
|
|
|
496
496
|
"CONCAT_LINES_OF": {
|
|
497
497
|
counter: BuiltIn.counter++,
|
|
498
498
|
mandatory: {
|
|
499
|
-
"table": new basic_1.TableType(
|
|
499
|
+
"table": new basic_1.TableType(basic_1.AnyType.get(), { withHeader: false, keyType: basic_1.TableKeyType.default }),
|
|
500
500
|
},
|
|
501
501
|
optional: {
|
|
502
502
|
"sep": basic_1.CLikeType.get(),
|
|
@@ -777,7 +777,7 @@ BuiltIn.methods = {
|
|
|
777
777
|
"LINE_EXISTS": {
|
|
778
778
|
counter: BuiltIn.counter++,
|
|
779
779
|
mandatory: {
|
|
780
|
-
"val":
|
|
780
|
+
"val": basic_1.AnyType.get(),
|
|
781
781
|
},
|
|
782
782
|
return: new basic_1.CharacterType(1),
|
|
783
783
|
predicate: true,
|
|
@@ -786,7 +786,7 @@ BuiltIn.methods = {
|
|
|
786
786
|
"LINE_INDEX": {
|
|
787
787
|
counter: BuiltIn.counter++,
|
|
788
788
|
mandatory: {
|
|
789
|
-
"val":
|
|
789
|
+
"val": basic_1.AnyType.get(),
|
|
790
790
|
},
|
|
791
791
|
return: basic_1.IntegerType.get(),
|
|
792
792
|
version: version_1.Version.v740sp02,
|
|
@@ -794,7 +794,7 @@ BuiltIn.methods = {
|
|
|
794
794
|
"LINES": {
|
|
795
795
|
counter: BuiltIn.counter++,
|
|
796
796
|
mandatory: {
|
|
797
|
-
"val": new basic_1.TableType(
|
|
797
|
+
"val": new basic_1.TableType(basic_1.AnyType.get(), { withHeader: false, keyType: basic_1.TableKeyType.default }),
|
|
798
798
|
},
|
|
799
799
|
return: basic_1.IntegerType.get(),
|
|
800
800
|
},
|
|
@@ -429,6 +429,19 @@ class CurrentScope {
|
|
|
429
429
|
}
|
|
430
430
|
return false;
|
|
431
431
|
}
|
|
432
|
+
isAnyOO() {
|
|
433
|
+
let curr = this.current;
|
|
434
|
+
while (curr !== undefined) {
|
|
435
|
+
const stype = curr.getIdentifier().stype;
|
|
436
|
+
if (stype === _scope_type_1.ScopeType.ClassDefinition
|
|
437
|
+
|| stype === _scope_type_1.ScopeType.ClassImplementation
|
|
438
|
+
|| stype === _scope_type_1.ScopeType.Interface) {
|
|
439
|
+
return true;
|
|
440
|
+
}
|
|
441
|
+
curr = curr.getParent();
|
|
442
|
+
}
|
|
443
|
+
return false;
|
|
444
|
+
}
|
|
432
445
|
isGlobalOO() {
|
|
433
446
|
return this.parentObj.getType() === "INTF" || this.parentObj.getType() === "CLAS";
|
|
434
447
|
}
|
|
@@ -89,7 +89,7 @@ class Procedural {
|
|
|
89
89
|
for (const param of definition.getParameters()) {
|
|
90
90
|
let found = undefined;
|
|
91
91
|
if (param.type === undefined || param.type === "") {
|
|
92
|
-
found =
|
|
92
|
+
found = basic_1.AnyType.get();
|
|
93
93
|
}
|
|
94
94
|
else if (param.type.includes("=>")) {
|
|
95
95
|
// then its a type from global INTF or CLAS
|
|
@@ -160,7 +160,7 @@ class Procedural {
|
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
162
|
if (found instanceof basic_1.UnknownType && new ddic_1.DDIC(this.reg).inErrorNamespace(param.type) === false) {
|
|
163
|
-
found =
|
|
163
|
+
found = basic_1.VoidType.get(param.type);
|
|
164
164
|
}
|
|
165
165
|
if (allNames.has(param.name.toUpperCase())) {
|
|
166
166
|
// yea, IMPORTING and EXPORTING can have the same name
|
|
@@ -237,7 +237,7 @@ class TypeUtils {
|
|
|
237
237
|
return calculated;
|
|
238
238
|
}
|
|
239
239
|
isAssignableStrict(source, target, node) {
|
|
240
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
240
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
241
241
|
const calculated = node ? this.isCalculated(node) : false;
|
|
242
242
|
/*
|
|
243
243
|
console.dir(source);
|
|
@@ -263,16 +263,22 @@ class TypeUtils {
|
|
|
263
263
|
}
|
|
264
264
|
return false;
|
|
265
265
|
}
|
|
266
|
-
else if (target instanceof basic_1.
|
|
266
|
+
else if (target instanceof basic_1.XStringType) {
|
|
267
267
|
if (((_c = source.getAbstractTypeData()) === null || _c === void 0 ? void 0 : _c.derivedFromConstant) === true) {
|
|
268
268
|
return true;
|
|
269
269
|
}
|
|
270
270
|
return false;
|
|
271
271
|
}
|
|
272
|
+
else if (target instanceof basic_1.StringType) {
|
|
273
|
+
if (((_d = source.getAbstractTypeData()) === null || _d === void 0 ? void 0 : _d.derivedFromConstant) === true) {
|
|
274
|
+
return true;
|
|
275
|
+
}
|
|
276
|
+
return false;
|
|
277
|
+
}
|
|
272
278
|
}
|
|
273
279
|
else if (source instanceof basic_1.HexType) {
|
|
274
280
|
if (target instanceof basic_1.HexType) {
|
|
275
|
-
if (((
|
|
281
|
+
if (((_e = source.getAbstractTypeData()) === null || _e === void 0 ? void 0 : _e.derivedFromConstant) === true) {
|
|
276
282
|
return source.getLength() <= target.getLength();
|
|
277
283
|
}
|
|
278
284
|
return source.getLength() === target.getLength();
|
|
@@ -281,7 +287,7 @@ class TypeUtils {
|
|
|
281
287
|
return false;
|
|
282
288
|
}
|
|
283
289
|
else if (target instanceof basic_1.IntegerType || target instanceof basic_1.Integer8Type) {
|
|
284
|
-
if (((
|
|
290
|
+
if (((_f = source.getAbstractTypeData()) === null || _f === void 0 ? void 0 : _f.derivedFromConstant) === true) {
|
|
285
291
|
return true;
|
|
286
292
|
}
|
|
287
293
|
return false;
|
|
@@ -299,7 +305,7 @@ class TypeUtils {
|
|
|
299
305
|
*/
|
|
300
306
|
}
|
|
301
307
|
else if (target instanceof basic_1.IntegerType) {
|
|
302
|
-
if (((
|
|
308
|
+
if (((_g = source.getAbstractTypeData()) === null || _g === void 0 ? void 0 : _g.derivedFromConstant) === true) {
|
|
303
309
|
return true;
|
|
304
310
|
}
|
|
305
311
|
return false;
|
|
@@ -309,7 +315,7 @@ class TypeUtils {
|
|
|
309
315
|
return false;
|
|
310
316
|
}
|
|
311
317
|
else if (target instanceof basic_1.XSequenceType || target instanceof basic_1.XStringType) {
|
|
312
|
-
if (((
|
|
318
|
+
if (((_h = source.getAbstractTypeData()) === null || _h === void 0 ? void 0 : _h.derivedFromConstant) === true) {
|
|
313
319
|
return true;
|
|
314
320
|
}
|
|
315
321
|
return false;
|
|
@@ -353,7 +359,7 @@ class TypeUtils {
|
|
|
353
359
|
return false;
|
|
354
360
|
}
|
|
355
361
|
else if (target instanceof basic_1.Integer8Type || target instanceof basic_1.PackedType) {
|
|
356
|
-
if (((
|
|
362
|
+
if (((_j = source.getAbstractTypeData()) === null || _j === void 0 ? void 0 : _j.derivedFromConstant) === true) {
|
|
357
363
|
return true;
|
|
358
364
|
}
|
|
359
365
|
return false;
|
|
@@ -118,7 +118,7 @@ class BasicTypes {
|
|
|
118
118
|
}
|
|
119
119
|
let type = undefined;
|
|
120
120
|
if (children[1] && (children[1].getFirstToken().getStr() === "=>" || children[1].getFirstToken().getStr() === "->")) {
|
|
121
|
-
type =
|
|
121
|
+
type = field_chain_1.FieldChain.runSyntax(chain, this.input, _reference_1.ReferenceType.TypeReference);
|
|
122
122
|
}
|
|
123
123
|
else {
|
|
124
124
|
const name = children.shift().getFirstToken().getStr();
|
|
@@ -139,9 +139,9 @@ class BasicTypes {
|
|
|
139
139
|
if (type === undefined) {
|
|
140
140
|
type = (_a = this.input.scope.getDDIC().lookupNoVoid(name)) === null || _a === void 0 ? void 0 : _a.type;
|
|
141
141
|
}
|
|
142
|
-
if (type === undefined && this.input.scope.
|
|
142
|
+
if (type === undefined && this.input.scope.isAnyOO() === false && this.input.scope.getDDIC().inErrorNamespace(name) === false) {
|
|
143
143
|
this.input.scope.addReference(chain.getChildren()[0].getFirstToken(), undefined, _reference_1.ReferenceType.VoidType, this.input.filename);
|
|
144
|
-
return
|
|
144
|
+
return Types.VoidType.get(name);
|
|
145
145
|
}
|
|
146
146
|
while (children.length > 0) {
|
|
147
147
|
const child = children.shift();
|
|
@@ -383,7 +383,7 @@ class BasicTypes {
|
|
|
383
383
|
|| text === "TYPE HASHED TABLE"
|
|
384
384
|
|| text === "TYPE INDEX TABLE"
|
|
385
385
|
|| text === "TYPE ANY TABLE") {
|
|
386
|
-
return new Types.TableType(
|
|
386
|
+
return new Types.TableType(Types.AnyType.get(), options);
|
|
387
387
|
}
|
|
388
388
|
else if (text.startsWith("TYPE RANGE OF ")) {
|
|
389
389
|
const sub = node.findFirstExpression(Expressions.TypeName);
|
|
@@ -420,13 +420,13 @@ class BasicTypes {
|
|
|
420
420
|
const name = typename.concatTokens();
|
|
421
421
|
const type = (_d = this.input.scope.getDDIC().lookupDDLS(name)) === null || _d === void 0 ? void 0 : _d.type;
|
|
422
422
|
if (type) {
|
|
423
|
-
return new Types.TableType(
|
|
423
|
+
return new Types.TableType(basic_1.VoidType.get("RapTodo"), options);
|
|
424
424
|
}
|
|
425
425
|
else if (this.input.scope.getDDIC().inErrorNamespace(name)) {
|
|
426
426
|
return new Types.UnknownType(`DDLS ${name} not found`);
|
|
427
427
|
}
|
|
428
428
|
else {
|
|
429
|
-
return
|
|
429
|
+
return Types.VoidType.get(name);
|
|
430
430
|
}
|
|
431
431
|
}
|
|
432
432
|
// fallback to old style syntax, OCCURS etc
|
|
@@ -493,7 +493,7 @@ class BasicTypes {
|
|
|
493
493
|
|| text === "TYPE HASHED TABLE"
|
|
494
494
|
|| text === "TYPE INDEX TABLE"
|
|
495
495
|
|| text === "TYPE ANY TABLE") {
|
|
496
|
-
return new Types.TableType(
|
|
496
|
+
return new Types.TableType(Types.AnyType.get(), { withHeader: node.concatTokens().toUpperCase().includes("WITH HEADER LINE"), keyType: Types.TableKeyType.default });
|
|
497
497
|
}
|
|
498
498
|
else if (text.startsWith("LIKE ")) {
|
|
499
499
|
let sub = node.findFirstExpression(Expressions.Type);
|
|
@@ -632,7 +632,7 @@ class BasicTypes {
|
|
|
632
632
|
const obj = this.input.scope.findObjectDefinition(className);
|
|
633
633
|
if (obj === undefined && this.input.scope.getDDIC().inErrorNamespace(className) === false) {
|
|
634
634
|
this.input.scope.addReference(expr.getFirstToken(), undefined, _reference_1.ReferenceType.ObjectOrientedVoidReference, this.input.filename, { ooName: className.toUpperCase() });
|
|
635
|
-
return
|
|
635
|
+
return Types.VoidType.get(className);
|
|
636
636
|
}
|
|
637
637
|
else if (obj === undefined) {
|
|
638
638
|
return new Types.UnknownType("Could not resolve top " + className + ", resolveTypeChain");
|
|
@@ -714,7 +714,7 @@ class BasicTypes {
|
|
|
714
714
|
}
|
|
715
715
|
if (foundType === undefined && this.input.scope.getDDIC().inErrorNamespace(subs[0]) === false) {
|
|
716
716
|
this.input.scope.addReference(expr.getFirstToken(), undefined, _reference_1.ReferenceType.VoidType, this.input.filename);
|
|
717
|
-
return
|
|
717
|
+
return Types.VoidType.get(subs[0]);
|
|
718
718
|
}
|
|
719
719
|
else if (foundType instanceof Types.VoidType) {
|
|
720
720
|
this.input.scope.addReference(expr.getFirstToken(), undefined, _reference_1.ReferenceType.VoidType, this.input.filename);
|
|
@@ -839,11 +839,11 @@ class BasicTypes {
|
|
|
839
839
|
return new Types.DataReference(new Types.DataType());
|
|
840
840
|
}
|
|
841
841
|
if (this.input.scope.isBadiDef(name) === true) {
|
|
842
|
-
return
|
|
842
|
+
return Types.VoidType.get(name);
|
|
843
843
|
}
|
|
844
844
|
if (((_a = this.input.scope.getDDIC()) === null || _a === void 0 ? void 0 : _a.inErrorNamespace(name)) === false) {
|
|
845
845
|
// this.scope.addReference(chain.getFirstToken(), undefined, ReferenceType.VoidType, this.filename);
|
|
846
|
-
return
|
|
846
|
+
return Types.VoidType.get(name);
|
|
847
847
|
}
|
|
848
848
|
return new Types.UnknownType("REF, unable to resolve " + name);
|
|
849
849
|
}
|
|
@@ -7,25 +7,25 @@ const _object_oriented_1 = require("../_object_oriented");
|
|
|
7
7
|
const expressions_1 = require("../../2_statements/expressions");
|
|
8
8
|
const _syntax_input_1 = require("../_syntax_input");
|
|
9
9
|
class AttributeChain {
|
|
10
|
-
runSyntax(inputContext, node, input, type) {
|
|
10
|
+
static runSyntax(inputContext, node, input, type) {
|
|
11
11
|
if (inputContext instanceof void_type_1.VoidType) {
|
|
12
12
|
return inputContext;
|
|
13
13
|
}
|
|
14
14
|
else if (!(inputContext instanceof object_reference_type_1.ObjectReferenceType)) {
|
|
15
15
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), "Not an object reference(AttributeChain)"));
|
|
16
|
-
return
|
|
16
|
+
return void_type_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
|
|
17
17
|
}
|
|
18
18
|
const children = node.getChildren().slice();
|
|
19
19
|
const first = children[0];
|
|
20
20
|
if (!(first.get() instanceof expressions_1.AttributeName)) {
|
|
21
21
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), "AttributeChain, unexpected first child"));
|
|
22
|
-
return
|
|
22
|
+
return void_type_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
|
|
23
23
|
}
|
|
24
24
|
const def = input.scope.findObjectDefinition(inputContext.getIdentifierName());
|
|
25
25
|
if (def === undefined) {
|
|
26
26
|
const message = "Definition for \"" + inputContext.getIdentifierName() + "\" not found in scope(AttributeChain)";
|
|
27
27
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
28
|
-
return
|
|
28
|
+
return void_type_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
|
|
29
29
|
}
|
|
30
30
|
const nameToken = first.getFirstToken();
|
|
31
31
|
const name = nameToken.getStr();
|
|
@@ -37,7 +37,7 @@ class AttributeChain {
|
|
|
37
37
|
if (context === undefined) {
|
|
38
38
|
const message = "Attribute or constant \"" + name + "\" not found in \"" + def.getName() + "\"";
|
|
39
39
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, nameToken, message));
|
|
40
|
-
return
|
|
40
|
+
return void_type_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
|
|
41
41
|
}
|
|
42
42
|
for (const t of type) {
|
|
43
43
|
input.scope.addReference(nameToken, context, t, input.filename);
|
|
@@ -10,7 +10,7 @@ const _reference_1 = require("../_reference");
|
|
|
10
10
|
const basic_1 = require("../../types/basic");
|
|
11
11
|
const _syntax_input_1 = require("../_syntax_input");
|
|
12
12
|
class AttributeName {
|
|
13
|
-
runSyntax(context, node, input, type, error = true) {
|
|
13
|
+
static runSyntax(context, node, input, type, error = true) {
|
|
14
14
|
if (context instanceof void_type_1.VoidType) {
|
|
15
15
|
return context;
|
|
16
16
|
}
|
|
@@ -21,7 +21,7 @@ class AttributeName {
|
|
|
21
21
|
if (def === undefined) {
|
|
22
22
|
const message = "Definition for \"" + context.getIdentifierName() + "\" not found in scope(AttributeName)";
|
|
23
23
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
24
|
-
return
|
|
24
|
+
return void_type_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
|
|
25
25
|
}
|
|
26
26
|
const token = node.getFirstToken();
|
|
27
27
|
const name = token.getStr();
|
|
@@ -34,7 +34,7 @@ class AttributeName {
|
|
|
34
34
|
if (error === true) {
|
|
35
35
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
36
36
|
}
|
|
37
|
-
return
|
|
37
|
+
return void_type_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
|
|
38
38
|
}
|
|
39
39
|
if (type) {
|
|
40
40
|
input.scope.addReference(token, found, type, input.filename);
|
|
@@ -56,19 +56,19 @@ class AttributeName {
|
|
|
56
56
|
if (!(sub instanceof structure_type_1.StructureType)) {
|
|
57
57
|
const message = "Data reference not structured";
|
|
58
58
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
59
|
-
return
|
|
59
|
+
return void_type_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
|
|
60
60
|
}
|
|
61
61
|
ret = sub.getComponentByName(name);
|
|
62
62
|
if (ret === undefined) {
|
|
63
63
|
const message = "Component \"" + name + "\" not found in data reference structure";
|
|
64
64
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
65
|
-
return
|
|
65
|
+
return void_type_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
else {
|
|
69
69
|
const message = "Not an object reference, attribute name";
|
|
70
70
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
71
|
-
return
|
|
71
|
+
return void_type_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
|
|
72
72
|
}
|
|
73
73
|
return ret;
|
|
74
74
|
}
|
|
@@ -9,21 +9,21 @@ const basic_types_1 = require("../basic_types");
|
|
|
9
9
|
const _reference_1 = require("../_reference");
|
|
10
10
|
const _syntax_input_1 = require("../_syntax_input");
|
|
11
11
|
class Cast {
|
|
12
|
-
runSyntax(node, input, targetType) {
|
|
12
|
+
static runSyntax(node, input, targetType) {
|
|
13
13
|
const sourceNode = node.findDirectExpression(Expressions.Source);
|
|
14
14
|
if (sourceNode === undefined) {
|
|
15
15
|
const message = "Cast, source node not found";
|
|
16
16
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
17
|
-
return
|
|
17
|
+
return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
|
|
18
18
|
}
|
|
19
|
-
const sourceType =
|
|
19
|
+
const sourceType = source_1.Source.runSyntax(sourceNode, input);
|
|
20
20
|
let tt = undefined;
|
|
21
21
|
const typeExpression = node.findDirectExpression(Expressions.TypeNameOrInfer);
|
|
22
22
|
const typeName = typeExpression === null || typeExpression === void 0 ? void 0 : typeExpression.concatTokens();
|
|
23
23
|
if (typeName === undefined) {
|
|
24
24
|
const message = "Cast, child TypeNameOrInfer not found";
|
|
25
25
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
26
|
-
return
|
|
26
|
+
return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
|
|
27
27
|
}
|
|
28
28
|
else if (typeName === "#" && targetType) {
|
|
29
29
|
tt = targetType;
|
|
@@ -31,7 +31,7 @@ class Cast {
|
|
|
31
31
|
else if (typeName === "#") {
|
|
32
32
|
const message = "Cast, todo, infer type";
|
|
33
33
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
34
|
-
return
|
|
34
|
+
return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
|
|
35
35
|
}
|
|
36
36
|
if (tt === undefined && typeExpression) {
|
|
37
37
|
const basic = new basic_types_1.BasicTypes(input);
|
|
@@ -47,7 +47,7 @@ class Cast {
|
|
|
47
47
|
tt = new basic_1.DataReference(tt, typeName);
|
|
48
48
|
}
|
|
49
49
|
if (tt === undefined && input.scope.getDDIC().inErrorNamespace(typeName) === false) {
|
|
50
|
-
tt =
|
|
50
|
+
tt = basic_1.VoidType.get(typeName);
|
|
51
51
|
}
|
|
52
52
|
else if (typeName.toUpperCase() === "OBJECT") {
|
|
53
53
|
return new basic_1.GenericObjectReferenceType();
|
|
@@ -56,14 +56,14 @@ class Cast {
|
|
|
56
56
|
// todo, this should be an UnknownType instead?
|
|
57
57
|
const message = "Type \"" + typeName + "\" not found in scope, Cast";
|
|
58
58
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, typeExpression.getFirstToken(), message));
|
|
59
|
-
return
|
|
59
|
+
return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
|
|
62
|
+
source_1.Source.addIfInferred(node, input, tt);
|
|
63
63
|
if (new _type_utils_1.TypeUtils(input.scope).isCastable(sourceType, tt) === false) {
|
|
64
64
|
const message = "Cast, incompatible types";
|
|
65
65
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
66
|
-
return
|
|
66
|
+
return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
|
|
67
67
|
}
|
|
68
68
|
return tt;
|
|
69
69
|
}
|
|
@@ -6,15 +6,15 @@ const source_1 = require("./source");
|
|
|
6
6
|
const method_call_chain_1 = require("./method_call_chain");
|
|
7
7
|
const source_field_symbol_1 = require("./source_field_symbol");
|
|
8
8
|
class Compare {
|
|
9
|
-
runSyntax(node, input) {
|
|
9
|
+
static runSyntax(node, input) {
|
|
10
10
|
for (const t of node.findDirectExpressions(Expressions.Source)) {
|
|
11
|
-
|
|
11
|
+
source_1.Source.runSyntax(t, input);
|
|
12
12
|
}
|
|
13
13
|
for (const t of node.findDirectExpressions(Expressions.SourceFieldSymbolChain)) {
|
|
14
|
-
|
|
14
|
+
source_field_symbol_1.SourceFieldSymbol.runSyntax(t, input);
|
|
15
15
|
}
|
|
16
16
|
for (const t of node.findDirectExpressions(Expressions.MethodCallChain)) {
|
|
17
|
-
|
|
17
|
+
method_call_chain_1.MethodCallChain.runSyntax(t, input);
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
}
|
|
@@ -10,7 +10,7 @@ const _reference_1 = require("../_reference");
|
|
|
10
10
|
const _object_oriented_1 = require("../_object_oriented");
|
|
11
11
|
const _syntax_input_1 = require("../_syntax_input");
|
|
12
12
|
class ComponentChain {
|
|
13
|
-
runSyntax(context, node, input) {
|
|
13
|
+
static runSyntax(context, node, input) {
|
|
14
14
|
if (context === undefined) {
|
|
15
15
|
return undefined;
|
|
16
16
|
}
|
|
@@ -29,21 +29,21 @@ class ComponentChain {
|
|
|
29
29
|
if (!(context instanceof structure_type_1.StructureType)) {
|
|
30
30
|
const message = "ComponentChain, not a structure";
|
|
31
31
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, child.getFirstToken(), message));
|
|
32
|
-
return
|
|
32
|
+
return void_type_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
else if (concat === "=>") {
|
|
36
36
|
if (!(context instanceof basic_1.ObjectReferenceType)) {
|
|
37
37
|
const message = "ComponentChain, not a reference";
|
|
38
38
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, child.getFirstToken(), message));
|
|
39
|
-
return
|
|
39
|
+
return void_type_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
else if (concat === "->") {
|
|
43
43
|
if (!(context instanceof basic_1.ObjectReferenceType) && !(context instanceof basic_1.DataReference)) {
|
|
44
44
|
const message = "ComponentChain, not a reference";
|
|
45
45
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, child.getFirstToken(), message));
|
|
46
|
-
return
|
|
46
|
+
return void_type_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
}
|
|
@@ -60,7 +60,7 @@ class ComponentChain {
|
|
|
60
60
|
if (context === undefined) {
|
|
61
61
|
const message = "Component \"" + name + "\" not found in structure";
|
|
62
62
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, child.getFirstToken(), message));
|
|
63
|
-
return
|
|
63
|
+
return void_type_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
else if (context instanceof basic_1.ObjectReferenceType) {
|
|
@@ -69,7 +69,7 @@ class ComponentChain {
|
|
|
69
69
|
if (def === undefined) {
|
|
70
70
|
const message = id.getName() + " not found in scope";
|
|
71
71
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, child.getFirstToken(), message));
|
|
72
|
-
return
|
|
72
|
+
return void_type_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
|
|
73
73
|
}
|
|
74
74
|
const helper = new _object_oriented_1.ObjectOriented(input.scope);
|
|
75
75
|
const found = helper.searchAttributeName(def, name);
|
|
@@ -77,7 +77,7 @@ class ComponentChain {
|
|
|
77
77
|
if (context === undefined) {
|
|
78
78
|
const message = "Attribute \"" + name + "\" not found";
|
|
79
79
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, child.getFirstToken(), message));
|
|
80
|
-
return
|
|
80
|
+
return void_type_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
|
|
81
81
|
}
|
|
82
82
|
else {
|
|
83
83
|
const extra = {
|
|
@@ -90,7 +90,7 @@ class ComponentChain {
|
|
|
90
90
|
else {
|
|
91
91
|
const message = "ComponentChain, not a structure, " + (context === null || context === void 0 ? void 0 : context.constructor.name);
|
|
92
92
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, child.getFirstToken(), message));
|
|
93
|
-
return
|
|
93
|
+
return void_type_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
}
|
|
@@ -6,16 +6,16 @@ const _syntax_input_1 = require("../_syntax_input");
|
|
|
6
6
|
const component_chain_1 = require("./component_chain");
|
|
7
7
|
const source_1 = require("./source");
|
|
8
8
|
class ComponentCompare {
|
|
9
|
-
runSyntax(node, input, type) {
|
|
9
|
+
static runSyntax(node, input, type) {
|
|
10
10
|
const chain = node.findDirectExpression(Expressions.ComponentChainSimple);
|
|
11
11
|
if (chain === undefined) {
|
|
12
12
|
const message = "ComponentCompare, chain not found";
|
|
13
13
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
14
14
|
return;
|
|
15
15
|
}
|
|
16
|
-
|
|
16
|
+
component_chain_1.ComponentChain.runSyntax(type, chain, input);
|
|
17
17
|
for (const s of node.findDirectExpressions(Expressions.Source)) {
|
|
18
|
-
|
|
18
|
+
source_1.Source.runSyntax(s, input);
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
}
|
|
@@ -8,18 +8,18 @@ const _type_utils_1 = require("../_type_utils");
|
|
|
8
8
|
const component_chain_1 = require("./component_chain");
|
|
9
9
|
const source_1 = require("./source");
|
|
10
10
|
class ComponentCompareSimple {
|
|
11
|
-
runSyntax(node, input, rowType) {
|
|
11
|
+
static runSyntax(node, input, rowType) {
|
|
12
12
|
let targetType = undefined;
|
|
13
13
|
for (const c of node.getChildren()) {
|
|
14
14
|
if (c instanceof nodes_1.ExpressionNode) {
|
|
15
15
|
if (c.get() instanceof Expressions.ComponentChainSimple) {
|
|
16
|
-
targetType =
|
|
16
|
+
targetType = component_chain_1.ComponentChain.runSyntax(rowType, c, input);
|
|
17
17
|
}
|
|
18
18
|
else if (c.get() instanceof Expressions.Dynamic) {
|
|
19
19
|
targetType = undefined;
|
|
20
20
|
}
|
|
21
21
|
else if (c.get() instanceof Expressions.Source) {
|
|
22
|
-
const sourceType =
|
|
22
|
+
const sourceType = source_1.Source.runSyntax(c, input, targetType);
|
|
23
23
|
if (targetType && new _type_utils_1.TypeUtils(input.scope).isAssignable(sourceType, targetType) === false) {
|
|
24
24
|
const message = "ComponentCompareSimple, incompatible types";
|
|
25
25
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|