@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.
Files changed (205) hide show
  1. package/build/abaplint.d.ts +18 -3
  2. package/build/src/abap/5_syntax/_builtin.js +10 -10
  3. package/build/src/abap/5_syntax/_current_scope.js +13 -0
  4. package/build/src/abap/5_syntax/_procedural.js +2 -2
  5. package/build/src/abap/5_syntax/_type_utils.js +13 -7
  6. package/build/src/abap/5_syntax/basic_types.js +11 -11
  7. package/build/src/abap/5_syntax/expressions/attribute_chain.js +5 -5
  8. package/build/src/abap/5_syntax/expressions/attribute_name.js +6 -6
  9. package/build/src/abap/5_syntax/expressions/cast.js +9 -9
  10. package/build/src/abap/5_syntax/expressions/compare.js +4 -4
  11. package/build/src/abap/5_syntax/expressions/component_chain.js +8 -8
  12. package/build/src/abap/5_syntax/expressions/component_compare.js +3 -3
  13. package/build/src/abap/5_syntax/expressions/component_compare_simple.js +3 -3
  14. package/build/src/abap/5_syntax/expressions/component_cond.js +3 -3
  15. package/build/src/abap/5_syntax/expressions/component_name.js +4 -4
  16. package/build/src/abap/5_syntax/expressions/cond.js +3 -3
  17. package/build/src/abap/5_syntax/expressions/cond_body.js +5 -5
  18. package/build/src/abap/5_syntax/expressions/constant.js +1 -1
  19. package/build/src/abap/5_syntax/expressions/conv_body.js +4 -4
  20. package/build/src/abap/5_syntax/expressions/corresponding_body.js +3 -3
  21. package/build/src/abap/5_syntax/expressions/data_definition.js +3 -4
  22. package/build/src/abap/5_syntax/expressions/database_table.js +1 -1
  23. package/build/src/abap/5_syntax/expressions/default.js +3 -3
  24. package/build/src/abap/5_syntax/expressions/dereference.js +2 -2
  25. package/build/src/abap/5_syntax/expressions/dynamic.js +2 -2
  26. package/build/src/abap/5_syntax/expressions/field_assignment.js +2 -2
  27. package/build/src/abap/5_syntax/expressions/field_chain.js +19 -19
  28. package/build/src/abap/5_syntax/expressions/field_length.js +2 -2
  29. package/build/src/abap/5_syntax/expressions/field_offset.js +2 -2
  30. package/build/src/abap/5_syntax/expressions/filter_body.js +3 -3
  31. package/build/src/abap/5_syntax/expressions/for.js +8 -8
  32. package/build/src/abap/5_syntax/expressions/form_param.js +2 -2
  33. package/build/src/abap/5_syntax/expressions/fstarget.js +2 -2
  34. package/build/src/abap/5_syntax/expressions/inline_data.js +1 -1
  35. package/build/src/abap/5_syntax/expressions/inline_field_definition.js +3 -3
  36. package/build/src/abap/5_syntax/expressions/inline_fs.js +1 -1
  37. package/build/src/abap/5_syntax/expressions/inline_loop_definition.js +2 -2
  38. package/build/src/abap/5_syntax/expressions/let.js +2 -2
  39. package/build/src/abap/5_syntax/expressions/loop_group_by.js +6 -6
  40. package/build/src/abap/5_syntax/expressions/message_source.js +2 -2
  41. package/build/src/abap/5_syntax/expressions/method_call_body.js +3 -3
  42. package/build/src/abap/5_syntax/expressions/method_call_chain.js +14 -14
  43. package/build/src/abap/5_syntax/expressions/method_call_param.js +2 -2
  44. package/build/src/abap/5_syntax/expressions/method_def_returning.js +1 -1
  45. package/build/src/abap/5_syntax/expressions/method_param.js +4 -4
  46. package/build/src/abap/5_syntax/expressions/method_parameters.js +7 -7
  47. package/build/src/abap/5_syntax/expressions/method_source.js +20 -20
  48. package/build/src/abap/5_syntax/expressions/new_object.js +10 -10
  49. package/build/src/abap/5_syntax/expressions/raise_with.js +2 -2
  50. package/build/src/abap/5_syntax/expressions/reduce_body.js +7 -7
  51. package/build/src/abap/5_syntax/expressions/reduce_next.js +3 -3
  52. package/build/src/abap/5_syntax/expressions/select.js +25 -25
  53. package/build/src/abap/5_syntax/expressions/select_loop.js +2 -2
  54. package/build/src/abap/5_syntax/expressions/source.js +30 -30
  55. package/build/src/abap/5_syntax/expressions/source_field.js +2 -2
  56. package/build/src/abap/5_syntax/expressions/source_field_symbol.js +2 -2
  57. package/build/src/abap/5_syntax/expressions/sql_compare.js +6 -6
  58. package/build/src/abap/5_syntax/expressions/sql_for_all_entries.js +2 -2
  59. package/build/src/abap/5_syntax/expressions/sql_from.js +3 -3
  60. package/build/src/abap/5_syntax/expressions/sql_in.js +4 -4
  61. package/build/src/abap/5_syntax/expressions/sql_order_by.js +2 -2
  62. package/build/src/abap/5_syntax/expressions/sql_source.js +3 -3
  63. package/build/src/abap/5_syntax/expressions/string_template.js +6 -6
  64. package/build/src/abap/5_syntax/expressions/switch_body.js +4 -4
  65. package/build/src/abap/5_syntax/expressions/table_expression.js +2 -2
  66. package/build/src/abap/5_syntax/expressions/target.js +19 -19
  67. package/build/src/abap/5_syntax/expressions/type_table.js +2 -2
  68. package/build/src/abap/5_syntax/expressions/type_table_key.js +1 -1
  69. package/build/src/abap/5_syntax/expressions/value_body.js +10 -10
  70. package/build/src/abap/5_syntax/statements/add.js +2 -2
  71. package/build/src/abap/5_syntax/statements/add_corresponding.js +2 -2
  72. package/build/src/abap/5_syntax/statements/append.js +6 -6
  73. package/build/src/abap/5_syntax/statements/assert.js +1 -1
  74. package/build/src/abap/5_syntax/statements/assign.js +8 -8
  75. package/build/src/abap/5_syntax/statements/authority_check.js +1 -1
  76. package/build/src/abap/5_syntax/statements/call.js +3 -3
  77. package/build/src/abap/5_syntax/statements/call_badi.js +3 -3
  78. package/build/src/abap/5_syntax/statements/call_function.js +6 -6
  79. package/build/src/abap/5_syntax/statements/call_kernel.js +1 -1
  80. package/build/src/abap/5_syntax/statements/call_transaction.js +2 -2
  81. package/build/src/abap/5_syntax/statements/call_transformation.js +4 -4
  82. package/build/src/abap/5_syntax/statements/case.js +1 -1
  83. package/build/src/abap/5_syntax/statements/case_type.js +1 -1
  84. package/build/src/abap/5_syntax/statements/catch.js +2 -2
  85. package/build/src/abap/5_syntax/statements/check.js +1 -1
  86. package/build/src/abap/5_syntax/statements/class_data.js +2 -2
  87. package/build/src/abap/5_syntax/statements/class_implementation.js +1 -1
  88. package/build/src/abap/5_syntax/statements/clear.js +2 -2
  89. package/build/src/abap/5_syntax/statements/close_dataset.js +1 -1
  90. package/build/src/abap/5_syntax/statements/collect.js +3 -3
  91. package/build/src/abap/5_syntax/statements/commit_entities.js +3 -3
  92. package/build/src/abap/5_syntax/statements/concatenate.js +5 -5
  93. package/build/src/abap/5_syntax/statements/condense.js +1 -1
  94. package/build/src/abap/5_syntax/statements/convert.js +7 -7
  95. package/build/src/abap/5_syntax/statements/create_data.js +3 -3
  96. package/build/src/abap/5_syntax/statements/create_object.js +9 -6
  97. package/build/src/abap/5_syntax/statements/data.js +2 -2
  98. package/build/src/abap/5_syntax/statements/delete_cluster.js +1 -1
  99. package/build/src/abap/5_syntax/statements/delete_database.js +4 -4
  100. package/build/src/abap/5_syntax/statements/delete_internal.js +4 -4
  101. package/build/src/abap/5_syntax/statements/delete_memory.js +1 -1
  102. package/build/src/abap/5_syntax/statements/delete_report.js +1 -1
  103. package/build/src/abap/5_syntax/statements/describe.js +10 -10
  104. package/build/src/abap/5_syntax/statements/divide.js +2 -2
  105. package/build/src/abap/5_syntax/statements/do.js +2 -2
  106. package/build/src/abap/5_syntax/statements/editor_call.js +2 -2
  107. package/build/src/abap/5_syntax/statements/else_if.js +1 -1
  108. package/build/src/abap/5_syntax/statements/export.js +2 -2
  109. package/build/src/abap/5_syntax/statements/find.js +5 -5
  110. package/build/src/abap/5_syntax/statements/format.js +1 -1
  111. package/build/src/abap/5_syntax/statements/get_badi.js +3 -3
  112. package/build/src/abap/5_syntax/statements/get_bit.js +3 -3
  113. package/build/src/abap/5_syntax/statements/get_cursor.js +1 -1
  114. package/build/src/abap/5_syntax/statements/get_locale.js +2 -2
  115. package/build/src/abap/5_syntax/statements/get_parameter.js +3 -3
  116. package/build/src/abap/5_syntax/statements/get_reference.js +3 -3
  117. package/build/src/abap/5_syntax/statements/get_run_time.js +2 -2
  118. package/build/src/abap/5_syntax/statements/get_time.js +2 -2
  119. package/build/src/abap/5_syntax/statements/if.js +1 -1
  120. package/build/src/abap/5_syntax/statements/import.js +2 -2
  121. package/build/src/abap/5_syntax/statements/import_dynpro.js +2 -2
  122. package/build/src/abap/5_syntax/statements/include_type.js +2 -2
  123. package/build/src/abap/5_syntax/statements/insert_database.js +4 -4
  124. package/build/src/abap/5_syntax/statements/insert_field_group.js +3 -3
  125. package/build/src/abap/5_syntax/statements/insert_internal.js +7 -7
  126. package/build/src/abap/5_syntax/statements/insert_report.js +1 -1
  127. package/build/src/abap/5_syntax/statements/insert_textpool.js +1 -1
  128. package/build/src/abap/5_syntax/statements/log_point.js +1 -1
  129. package/build/src/abap/5_syntax/statements/loop.js +10 -10
  130. package/build/src/abap/5_syntax/statements/loop_at_screen.js +2 -2
  131. package/build/src/abap/5_syntax/statements/message.js +5 -5
  132. package/build/src/abap/5_syntax/statements/modify_database.js +5 -5
  133. package/build/src/abap/5_syntax/statements/modify_entities.js +3 -3
  134. package/build/src/abap/5_syntax/statements/modify_internal.js +4 -4
  135. package/build/src/abap/5_syntax/statements/modify_screen.js +1 -1
  136. package/build/src/abap/5_syntax/statements/move.js +4 -4
  137. package/build/src/abap/5_syntax/statements/move_corresponding.js +2 -2
  138. package/build/src/abap/5_syntax/statements/multiply.js +2 -2
  139. package/build/src/abap/5_syntax/statements/open_dataset.js +2 -2
  140. package/build/src/abap/5_syntax/statements/pack.js +2 -2
  141. package/build/src/abap/5_syntax/statements/parameter.js +1 -1
  142. package/build/src/abap/5_syntax/statements/perform.js +4 -4
  143. package/build/src/abap/5_syntax/statements/raise.js +8 -8
  144. package/build/src/abap/5_syntax/statements/raise_event.js +1 -1
  145. package/build/src/abap/5_syntax/statements/read_entities.js +3 -3
  146. package/build/src/abap/5_syntax/statements/read_report.js +2 -2
  147. package/build/src/abap/5_syntax/statements/read_table.js +8 -8
  148. package/build/src/abap/5_syntax/statements/read_textpool.js +2 -2
  149. package/build/src/abap/5_syntax/statements/receive.js +2 -2
  150. package/build/src/abap/5_syntax/statements/replace.js +2 -2
  151. package/build/src/abap/5_syntax/statements/scan.js +2 -2
  152. package/build/src/abap/5_syntax/statements/search.js +1 -1
  153. package/build/src/abap/5_syntax/statements/select.js +1 -1
  154. package/build/src/abap/5_syntax/statements/select_loop.js +1 -1
  155. package/build/src/abap/5_syntax/statements/selectoption.js +4 -4
  156. package/build/src/abap/5_syntax/statements/set_bit.js +2 -2
  157. package/build/src/abap/5_syntax/statements/set_handler.js +2 -2
  158. package/build/src/abap/5_syntax/statements/set_locale.js +2 -2
  159. package/build/src/abap/5_syntax/statements/set_parameter.js +1 -1
  160. package/build/src/abap/5_syntax/statements/set_pf_status.js +1 -1
  161. package/build/src/abap/5_syntax/statements/set_titlebar.js +1 -1
  162. package/build/src/abap/5_syntax/statements/shift.js +2 -2
  163. package/build/src/abap/5_syntax/statements/sort.js +2 -2
  164. package/build/src/abap/5_syntax/statements/split.js +3 -3
  165. package/build/src/abap/5_syntax/statements/static.js +1 -1
  166. package/build/src/abap/5_syntax/statements/submit.js +3 -3
  167. package/build/src/abap/5_syntax/statements/subtract.js +2 -2
  168. package/build/src/abap/5_syntax/statements/subtract_corresponding.js +2 -2
  169. package/build/src/abap/5_syntax/statements/syntax_check.js +2 -2
  170. package/build/src/abap/5_syntax/statements/system_call.js +1 -1
  171. package/build/src/abap/5_syntax/statements/transfer.js +2 -2
  172. package/build/src/abap/5_syntax/statements/translate.js +2 -2
  173. package/build/src/abap/5_syntax/statements/truncate_dataset.js +1 -1
  174. package/build/src/abap/5_syntax/statements/type.js +3 -3
  175. package/build/src/abap/5_syntax/statements/unpack.js +2 -2
  176. package/build/src/abap/5_syntax/statements/update_database.js +4 -4
  177. package/build/src/abap/5_syntax/statements/wait.js +2 -2
  178. package/build/src/abap/5_syntax/statements/when.js +1 -1
  179. package/build/src/abap/5_syntax/statements/when_type.js +3 -3
  180. package/build/src/abap/5_syntax/statements/while.js +3 -3
  181. package/build/src/abap/5_syntax/statements/with.js +2 -2
  182. package/build/src/abap/5_syntax/statements/with_loop.js +2 -2
  183. package/build/src/abap/5_syntax/statements/write.js +4 -4
  184. package/build/src/abap/5_syntax/structures/data.js +1 -1
  185. package/build/src/abap/5_syntax/structures/statics.js +1 -1
  186. package/build/src/abap/types/basic/any_type.js +13 -0
  187. package/build/src/abap/types/basic/cgeneric_type.js +7 -0
  188. package/build/src/abap/types/basic/integer_type.js +7 -4
  189. package/build/src/abap/types/basic/string_type.js +7 -4
  190. package/build/src/abap/types/basic/void_type.js +10 -0
  191. package/build/src/abap/types/basic/xgeneric_type.js +7 -0
  192. package/build/src/abap/types/basic/xstring_type.js +13 -0
  193. package/build/src/abap/types/event_definition.js +1 -1
  194. package/build/src/abap/types/form_definition.js +3 -3
  195. package/build/src/abap/types/method_parameters.js +11 -11
  196. package/build/src/cds/cds_determine_types.js +5 -5
  197. package/build/src/ddic.js +11 -11
  198. package/build/src/objects/authorization_check_field.js +1 -1
  199. package/build/src/objects/lock_object.js +1 -1
  200. package/build/src/objects/maintenance_and_transport_object.js +2 -2
  201. package/build/src/objects/table.js +1 -1
  202. package/build/src/objects/view.js +1 -1
  203. package/build/src/registry.js +1 -1
  204. package/build/src/rules/xml_consistency.js +1 -1
  205. package/package.json +5 -5
@@ -7,10 +7,10 @@ const target_1 = require("../expressions/target");
7
7
  class ImportDynpro {
8
8
  runSyntax(node, input) {
9
9
  for (const s of node.findDirectExpressions(Expressions.Source)) {
10
- new source_1.Source().runSyntax(s, input);
10
+ source_1.Source.runSyntax(s, input);
11
11
  }
12
12
  for (const t of node.findDirectExpressions(Expressions.Target)) {
13
- new target_1.Target().runSyntax(t, input);
13
+ target_1.Target.runSyntax(t, input);
14
14
  }
15
15
  }
16
16
  }
@@ -53,12 +53,12 @@ class IncludeType {
53
53
  return ityp;
54
54
  }
55
55
  else if (input.scope.getDDIC().inErrorNamespace(name) === false) {
56
- return new basic_1.VoidType(name);
56
+ return basic_1.VoidType.get(name);
57
57
  }
58
58
  else {
59
59
  const message = "IncludeType, type not found \"" + iname.concatTokens() + "\"";
60
60
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
61
- return new basic_1.VoidType(_syntax_input_1.CheckSyntaxKey);
61
+ return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
62
62
  }
63
63
  return components;
64
64
  }
@@ -8,17 +8,17 @@ const database_table_1 = require("../expressions/database_table");
8
8
  class InsertDatabase {
9
9
  runSyntax(node, input) {
10
10
  for (const s of node.findAllExpressions(Expressions.Source)) {
11
- new source_1.Source().runSyntax(s, input);
11
+ source_1.Source.runSyntax(s, input);
12
12
  }
13
13
  for (const s of node.findAllExpressions(Expressions.SimpleSource3)) {
14
- new source_1.Source().runSyntax(s, input);
14
+ source_1.Source.runSyntax(s, input);
15
15
  }
16
16
  for (const d of node.findAllExpressions(Expressions.Dynamic)) {
17
- new dynamic_1.Dynamic().runSyntax(d, input);
17
+ dynamic_1.Dynamic.runSyntax(d, input);
18
18
  }
19
19
  const dbtab = node.findFirstExpression(Expressions.DatabaseTable);
20
20
  if (dbtab !== undefined) {
21
- new database_table_1.DatabaseTable().runSyntax(dbtab, input);
21
+ database_table_1.DatabaseTable.runSyntax(dbtab, input);
22
22
  }
23
23
  }
24
24
  }
@@ -7,13 +7,13 @@ const target_1 = require("../expressions/target");
7
7
  class InsertFieldGroup {
8
8
  runSyntax(node, input) {
9
9
  for (const s of node.findAllExpressions(Expressions.Source)) {
10
- new source_1.Source().runSyntax(s, input);
10
+ source_1.Source.runSyntax(s, input);
11
11
  }
12
12
  for (const s of node.findAllExpressions(Expressions.SimpleSource1)) {
13
- new source_1.Source().runSyntax(s, input);
13
+ source_1.Source.runSyntax(s, input);
14
14
  }
15
15
  for (const t of node.findDirectExpressions(Expressions.Target)) {
16
- new target_1.Target().runSyntax(t, input);
16
+ target_1.Target.runSyntax(t, input);
17
17
  }
18
18
  }
19
19
  }
@@ -15,7 +15,7 @@ class InsertInternal {
15
15
  let targetType;
16
16
  const t = node.findDirectExpression(Expressions.Target);
17
17
  if (t) {
18
- targetType = new target_1.Target().runSyntax(t, input);
18
+ targetType = target_1.Target.runSyntax(t, input);
19
19
  }
20
20
  if (!(targetType instanceof basic_1.TableType)
21
21
  && !(targetType instanceof basic_1.VoidType)
@@ -34,7 +34,7 @@ class InsertInternal {
34
34
  if (source === undefined) {
35
35
  source = node.findDirectExpression(Expressions.Source);
36
36
  }
37
- const sourceType = source ? new source_1.Source().runSyntax(source, input, targetType) : targetType;
37
+ const sourceType = source ? source_1.Source.runSyntax(source, input, targetType) : targetType;
38
38
  if (targetType === undefined
39
39
  && !(sourceType instanceof basic_1.TableType)
40
40
  && !(sourceType instanceof basic_1.VoidType)
@@ -48,10 +48,10 @@ class InsertInternal {
48
48
  if ((afterAssigning === null || afterAssigning === void 0 ? void 0 : afterAssigning.get()) instanceof Expressions.FSTarget) {
49
49
  const inlinefs = afterAssigning === null || afterAssigning === void 0 ? void 0 : afterAssigning.findDirectExpression(Expressions.InlineFS);
50
50
  if (inlinefs) {
51
- new inline_fs_1.InlineFS().runSyntax(inlinefs, input, sourceType);
51
+ inline_fs_1.InlineFS.runSyntax(inlinefs, input, sourceType);
52
52
  }
53
53
  else {
54
- new fstarget_1.FSTarget().runSyntax(afterAssigning, input, sourceType);
54
+ fstarget_1.FSTarget.runSyntax(afterAssigning, input, sourceType);
55
55
  }
56
56
  }
57
57
  if (node.findDirectTokenByText("INITIAL") === undefined) {
@@ -71,17 +71,17 @@ class InsertInternal {
71
71
  if ((afterInto === null || afterInto === void 0 ? void 0 : afterInto.get()) instanceof Expressions.Target && sourceType) {
72
72
  const inline = afterInto.findDirectExpression(Expressions.InlineData);
73
73
  if (inline) {
74
- new inline_data_1.InlineData().runSyntax(afterInto, input, new basic_1.DataReference(sourceType));
74
+ inline_data_1.InlineData.runSyntax(afterInto, input, new basic_1.DataReference(sourceType));
75
75
  }
76
76
  else {
77
- new target_1.Target().runSyntax(afterInto, input);
77
+ target_1.Target.runSyntax(afterInto, input);
78
78
  }
79
79
  }
80
80
  for (const s of node.findDirectExpressions(Expressions.Source)) {
81
81
  if (s === source) {
82
82
  continue;
83
83
  }
84
- new source_1.Source().runSyntax(s, input, targetType);
84
+ source_1.Source.runSyntax(s, input, targetType);
85
85
  }
86
86
  }
87
87
  }
@@ -6,7 +6,7 @@ const source_1 = require("../expressions/source");
6
6
  class InsertReport {
7
7
  runSyntax(node, input) {
8
8
  for (const s of node.findDirectExpressions(Expressions.Source)) {
9
- new source_1.Source().runSyntax(s, input);
9
+ source_1.Source.runSyntax(s, input);
10
10
  }
11
11
  }
12
12
  }
@@ -6,7 +6,7 @@ const source_1 = require("../expressions/source");
6
6
  class InsertTextpool {
7
7
  runSyntax(node, input) {
8
8
  for (const s of node.findDirectExpressions(Expressions.Source)) {
9
- new source_1.Source().runSyntax(s, input);
9
+ source_1.Source.runSyntax(s, input);
10
10
  }
11
11
  }
12
12
  }
@@ -7,7 +7,7 @@ class LogPoint {
7
7
  runSyntax(node, input) {
8
8
  // just recurse
9
9
  for (const s of node.findDirectExpressions(Expressions.Source)) {
10
- new source_1.Source().runSyntax(s, input);
10
+ source_1.Source.runSyntax(s, input);
11
11
  }
12
12
  }
13
13
  }
@@ -16,7 +16,7 @@ class Loop {
16
16
  runSyntax(node, input) {
17
17
  const loopTarget = node.findDirectExpression(Expressions.LoopTarget);
18
18
  let target = loopTarget === null || loopTarget === void 0 ? void 0 : loopTarget.findDirectExpression(Expressions.Target);
19
- const targetType = target ? new target_1.Target().runSyntax(target, input) : undefined;
19
+ const targetType = target ? target_1.Target.runSyntax(target, input) : undefined;
20
20
  if (target === undefined) {
21
21
  target = node.findDirectExpression(Expressions.FSTarget);
22
22
  }
@@ -26,7 +26,7 @@ class Loop {
26
26
  if (firstSource === undefined) {
27
27
  firstSource = sources[0];
28
28
  }
29
- let sourceType = firstSource ? new source_1.Source().runSyntax(firstSource, input, targetType, write) : undefined;
29
+ let sourceType = firstSource ? source_1.Source.runSyntax(firstSource, input, targetType, write) : undefined;
30
30
  let rowType = undefined;
31
31
  const concat = node.concatTokens().toUpperCase();
32
32
  if (sourceType === undefined) {
@@ -39,7 +39,7 @@ class Loop {
39
39
  else if (sourceType instanceof basic_1.UnknownType) {
40
40
  const message = "Loop, not a table type, " + sourceType.getError();
41
41
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
42
- sourceType = new basic_1.VoidType("Loop, not a table type");
42
+ sourceType = basic_1.VoidType.get("Loop, not a table type");
43
43
  }
44
44
  else if (sourceType instanceof basic_1.TableType
45
45
  && target === undefined
@@ -79,33 +79,33 @@ class Loop {
79
79
  }
80
80
  const inline = target === null || target === void 0 ? void 0 : target.findDirectExpression(Expressions.InlineData);
81
81
  if (inline) {
82
- new inline_data_1.InlineData().runSyntax(inline, input, sourceType);
82
+ inline_data_1.InlineData.runSyntax(inline, input, sourceType);
83
83
  }
84
84
  for (const s of sources) {
85
85
  if (s === firstSource) {
86
86
  continue;
87
87
  }
88
- new source_1.Source().runSyntax(s, input);
88
+ source_1.Source.runSyntax(s, input);
89
89
  }
90
90
  const inlinefs = target === null || target === void 0 ? void 0 : target.findDirectExpression(Expressions.InlineFS);
91
91
  if (inlinefs) {
92
- new inline_fs_1.InlineFS().runSyntax(inlinefs, input, sourceType);
92
+ inline_fs_1.InlineFS.runSyntax(inlinefs, input, sourceType);
93
93
  }
94
94
  else {
95
95
  const fstarget = loopTarget === null || loopTarget === void 0 ? void 0 : loopTarget.findDirectExpression(Expressions.FSTarget);
96
96
  if (fstarget) {
97
- new fstarget_1.FSTarget().runSyntax(fstarget, input, sourceType);
97
+ fstarget_1.FSTarget.runSyntax(fstarget, input, sourceType);
98
98
  }
99
99
  }
100
100
  for (const t of node.findDirectExpressions(Expressions.ComponentCond)) {
101
- new component_cond_1.ComponentCond().runSyntax(t, input, rowType);
101
+ component_cond_1.ComponentCond.runSyntax(t, input, rowType);
102
102
  }
103
103
  for (const t of node.findDirectExpressions(Expressions.Dynamic)) {
104
- new dynamic_1.Dynamic().runSyntax(t, input);
104
+ dynamic_1.Dynamic.runSyntax(t, input);
105
105
  }
106
106
  const group = node.findDirectExpression(Expressions.LoopGroupBy);
107
107
  if (group) {
108
- new loop_group_by_1.LoopGroupBy().runSyntax(group, input);
108
+ loop_group_by_1.LoopGroupBy.runSyntax(group, input);
109
109
  }
110
110
  }
111
111
  }
@@ -9,11 +9,11 @@ class LoopAtScreen {
9
9
  runSyntax(node, input) {
10
10
  const target = node.findDirectExpression(Expressions.Target);
11
11
  if (target) {
12
- new target_1.Target().runSyntax(target, input);
12
+ target_1.Target.runSyntax(target, input);
13
13
  }
14
14
  const inline = target === null || target === void 0 ? void 0 : target.findDirectExpression(Expressions.InlineData);
15
15
  if (inline) {
16
- new inline_data_1.InlineData().runSyntax(inline, input, new basic_1.VoidType("SCREEN"));
16
+ inline_data_1.InlineData.runSyntax(inline, input, basic_1.VoidType.get("SCREEN"));
17
17
  }
18
18
  }
19
19
  }
@@ -12,19 +12,19 @@ class Message {
12
12
  const found = node.findExpressionAfterToken("INTO");
13
13
  const inline = found === null || found === void 0 ? void 0 : found.findDirectExpression(Expressions.InlineData);
14
14
  if (inline) {
15
- new inline_data_1.InlineData().runSyntax(inline, input, basic_1.StringType.get());
15
+ inline_data_1.InlineData.runSyntax(inline, input, basic_1.StringType.get());
16
16
  }
17
17
  else if (found) {
18
- new target_1.Target().runSyntax(found, input);
18
+ target_1.Target.runSyntax(found, input);
19
19
  }
20
20
  for (const s of node.findDirectExpressions(Expressions.Source)) {
21
- new source_1.Source().runSyntax(s, input);
21
+ source_1.Source.runSyntax(s, input);
22
22
  }
23
23
  for (const s of node.findDirectExpressions(Expressions.SimpleSource3)) {
24
- new source_1.Source().runSyntax(s, input);
24
+ source_1.Source.runSyntax(s, input);
25
25
  }
26
26
  for (const s of node.findDirectExpressions(Expressions.MessageSource)) {
27
- new message_source_1.MessageSource().runSyntax(s, input);
27
+ message_source_1.MessageSource.runSyntax(s, input);
28
28
  }
29
29
  }
30
30
  }
@@ -9,7 +9,7 @@ const _reference_1 = require("../_reference");
9
9
  class ModifyDatabase {
10
10
  runSyntax(node, input) {
11
11
  for (const d of node.findAllExpressions(Expressions.Dynamic)) {
12
- new dynamic_1.Dynamic().runSyntax(d, input);
12
+ dynamic_1.Dynamic.runSyntax(d, input);
13
13
  }
14
14
  const dbtab = node.findFirstExpression(Expressions.DatabaseTable);
15
15
  if (dbtab !== undefined) {
@@ -19,18 +19,18 @@ class ModifyDatabase {
19
19
  input.scope.addReference(dbtab.getFirstToken(), found, _reference_1.ReferenceType.DataWriteReference, input.filename);
20
20
  }
21
21
  else {
22
- new database_table_1.DatabaseTable().runSyntax(dbtab, input);
22
+ database_table_1.DatabaseTable.runSyntax(dbtab, input);
23
23
  }
24
24
  }
25
25
  else {
26
- new database_table_1.DatabaseTable().runSyntax(dbtab, input);
26
+ database_table_1.DatabaseTable.runSyntax(dbtab, input);
27
27
  }
28
28
  }
29
29
  for (const s of node.findAllExpressions(Expressions.Source)) {
30
- new source_1.Source().runSyntax(s, input);
30
+ source_1.Source.runSyntax(s, input);
31
31
  }
32
32
  for (const s of node.findAllExpressions(Expressions.SimpleSource3)) {
33
- new source_1.Source().runSyntax(s, input);
33
+ source_1.Source.runSyntax(s, input);
34
34
  }
35
35
  }
36
36
  }
@@ -9,15 +9,15 @@ const basic_1 = require("../../types/basic");
9
9
  class ModifyEntities {
10
10
  runSyntax(node, input) {
11
11
  for (const s of node.findDirectExpressions(Expressions.Source)) {
12
- new source_1.Source().runSyntax(s, input);
12
+ source_1.Source.runSyntax(s, input);
13
13
  }
14
14
  for (const t of node.findDirectExpressions(Expressions.Target)) {
15
15
  const inline = t === null || t === void 0 ? void 0 : t.findDirectExpression(Expressions.InlineData);
16
16
  if (inline) {
17
- new inline_data_1.InlineData().runSyntax(inline, input, new basic_1.VoidType("ModifyEntities"));
17
+ inline_data_1.InlineData.runSyntax(inline, input, basic_1.VoidType.get("ModifyEntities"));
18
18
  }
19
19
  else {
20
- new target_1.Target().runSyntax(t, input);
20
+ target_1.Target.runSyntax(t, input);
21
21
  }
22
22
  }
23
23
  }
@@ -11,14 +11,14 @@ const _syntax_input_1 = require("../_syntax_input");
11
11
  class ModifyInternal {
12
12
  runSyntax(node, input) {
13
13
  for (const s of node.findDirectExpressions(Expressions.Source)) {
14
- new source_1.Source().runSyntax(s, input);
14
+ source_1.Source.runSyntax(s, input);
15
15
  }
16
16
  // there is only one
17
17
  const target = node.findFirstExpression(Expressions.Target);
18
18
  const targetExpression = target;
19
19
  if (targetExpression) {
20
20
  // it might be a dynamic target
21
- const targetType = new target_1.Target().runSyntax(targetExpression, input);
21
+ const targetType = target_1.Target.runSyntax(targetExpression, input);
22
22
  if (targetType instanceof basic_1.VoidType
23
23
  || targetType instanceof basic_1.AnyType
24
24
  || targetType instanceof basic_1.UnknownType) {
@@ -50,10 +50,10 @@ class ModifyInternal {
50
50
  }
51
51
  const fstarget = node.findDirectExpression(Expressions.FSTarget);
52
52
  if (fstarget) {
53
- new fstarget_1.FSTarget().runSyntax(fstarget, input, undefined);
53
+ fstarget_1.FSTarget.runSyntax(fstarget, input, undefined);
54
54
  }
55
55
  for (const t of node.findDirectExpressions(Expressions.ComponentCond)) {
56
- new component_cond_1.ComponentCond().runSyntax(t, input);
56
+ component_cond_1.ComponentCond.runSyntax(t, input);
57
57
  }
58
58
  }
59
59
  }
@@ -6,7 +6,7 @@ const source_1 = require("../expressions/source");
6
6
  class ModifyScreen {
7
7
  runSyntax(node, input) {
8
8
  for (const s of node.findAllExpressions(Expressions.Source)) {
9
- new source_1.Source().runSyntax(s, input);
9
+ source_1.Source.runSyntax(s, input);
10
10
  }
11
11
  }
12
12
  }
@@ -14,23 +14,23 @@ class Move {
14
14
  const inline = firstTarget === null || firstTarget === void 0 ? void 0 : firstTarget.findDirectExpression(Expressions.InlineData);
15
15
  let targetType = undefined;
16
16
  if (inline === undefined) {
17
- targetType = firstTarget ? new target_1.Target().runSyntax(firstTarget, input) : undefined;
17
+ targetType = firstTarget ? target_1.Target.runSyntax(firstTarget, input) : undefined;
18
18
  for (const t of targets) {
19
19
  if (t === firstTarget) {
20
20
  continue;
21
21
  }
22
- new target_1.Target().runSyntax(t, input);
22
+ target_1.Target.runSyntax(t, input);
23
23
  }
24
24
  }
25
25
  const source = node.findDirectExpression(Expressions.Source);
26
- const sourceType = source ? new source_1.Source().runSyntax(source, input, targetType) : undefined;
26
+ const sourceType = source ? source_1.Source.runSyntax(source, input, targetType) : undefined;
27
27
  if (sourceType === undefined) {
28
28
  const message = "No source type determined";
29
29
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
30
30
  return;
31
31
  }
32
32
  if (inline) {
33
- new inline_data_1.InlineData().runSyntax(inline, input, sourceType);
33
+ inline_data_1.InlineData.runSyntax(inline, input, sourceType);
34
34
  targetType = sourceType;
35
35
  }
36
36
  if (node.findDirectTokenByText("?=")) {
@@ -16,8 +16,8 @@ class MoveCorresponding {
16
16
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
17
17
  return;
18
18
  }
19
- const sourceType = new source_1.Source().runSyntax(s, input);
20
- const targetType = new target_1.Target().runSyntax(t, input);
19
+ const sourceType = source_1.Source.runSyntax(s, input);
20
+ const targetType = target_1.Target.runSyntax(t, input);
21
21
  if (input.scope.getVersion() < version_1.Version.v740sp05 && input.scope.getVersion() !== version_1.Version.Cloud) {
22
22
  if (sourceType instanceof basic_1.TableType && sourceType.isWithHeader() === false) {
23
23
  const message = "MOVE-CORRESPONDING with tables possible from v740sp05";
@@ -7,10 +7,10 @@ const target_1 = require("../expressions/target");
7
7
  class Multiply {
8
8
  runSyntax(node, input) {
9
9
  for (const s of node.findDirectExpressions(Expressions.Source)) {
10
- new source_1.Source().runSyntax(s, input);
10
+ source_1.Source.runSyntax(s, input);
11
11
  }
12
12
  for (const t of node.findDirectExpressions(Expressions.Target)) {
13
- new target_1.Target().runSyntax(t, input);
13
+ target_1.Target.runSyntax(t, input);
14
14
  }
15
15
  }
16
16
  }
@@ -7,10 +7,10 @@ const target_1 = require("../expressions/target");
7
7
  class OpenDataset {
8
8
  runSyntax(node, input) {
9
9
  for (const s of node.findDirectExpressions(Expressions.Source)) {
10
- new source_1.Source().runSyntax(s, input);
10
+ source_1.Source.runSyntax(s, input);
11
11
  }
12
12
  for (const t of node.findDirectExpressions(Expressions.Target)) {
13
- new target_1.Target().runSyntax(t, input);
13
+ target_1.Target.runSyntax(t, input);
14
14
  }
15
15
  }
16
16
  }
@@ -7,10 +7,10 @@ const target_1 = require("../expressions/target");
7
7
  class Pack {
8
8
  runSyntax(node, input) {
9
9
  for (const s of node.findDirectExpressions(Expressions.Source)) {
10
- new source_1.Source().runSyntax(s, input);
10
+ source_1.Source.runSyntax(s, input);
11
11
  }
12
12
  for (const t of node.findDirectExpressions(Expressions.Target)) {
13
- new target_1.Target().runSyntax(t, input);
13
+ target_1.Target.runSyntax(t, input);
14
14
  }
15
15
  }
16
16
  }
@@ -33,7 +33,7 @@ class Parameter {
33
33
  }
34
34
  const magicName = "%_" + nameToken.getStr() + "_%_app_%";
35
35
  const magicToken = new tokens_1.Identifier(nameToken.getStart(), magicName);
36
- input.scope.addIdentifier(new _typed_identifier_1.TypedIdentifier(magicToken, input.filename, new basic_1.VoidType("PARAMETER magic")));
36
+ input.scope.addIdentifier(new _typed_identifier_1.TypedIdentifier(magicToken, input.filename, basic_1.VoidType.get("PARAMETER magic")));
37
37
  }
38
38
  }
39
39
  exports.Parameter = Parameter;
@@ -18,17 +18,17 @@ class Perform {
18
18
  // check parameters are defined
19
19
  for (const c of node.findDirectExpressions(Expressions.PerformChanging)) {
20
20
  for (const s of c.findDirectExpressions(Expressions.Target)) {
21
- new target_1.Target().runSyntax(s, input);
21
+ target_1.Target.runSyntax(s, input);
22
22
  }
23
23
  }
24
24
  for (const t of node.findDirectExpressions(Expressions.PerformTables)) {
25
25
  for (const s of t.findDirectExpressions(Expressions.Source)) {
26
- new source_1.Source().runSyntax(s, input);
26
+ source_1.Source.runSyntax(s, input);
27
27
  }
28
28
  }
29
29
  for (const u of node.findDirectExpressions(Expressions.PerformUsing)) {
30
30
  for (const s of u.findDirectExpressions(Expressions.Source)) {
31
- new source_1.Source().runSyntax(s, input);
31
+ source_1.Source.runSyntax(s, input);
32
32
  }
33
33
  }
34
34
  ////////////////////////////
@@ -38,7 +38,7 @@ class Perform {
38
38
  }
39
39
  const dynamic = node.findFirstExpression(Expressions.Dynamic);
40
40
  if (dynamic) {
41
- new dynamic_1.Dynamic().runSyntax(dynamic, input);
41
+ dynamic_1.Dynamic.runSyntax(dynamic, input);
42
42
  return; // todo, maybe some parts can be checked
43
43
  }
44
44
  const expr = node.findFirstExpression(Expressions.FormName);
@@ -29,7 +29,7 @@ class Raise {
29
29
  else if (input.scope.getDDIC().inErrorNamespace(className) === false) {
30
30
  const extra = { ooName: className, ooType: "Void" };
31
31
  input.scope.addReference(classTok, undefined, _reference_1.ReferenceType.ObjectOrientedVoidReference, input.filename, extra);
32
- method = new basic_1.VoidType(className);
32
+ method = basic_1.VoidType.get(className);
33
33
  }
34
34
  else {
35
35
  const message = "RAISE, unknown class " + className;
@@ -37,12 +37,12 @@ class Raise {
37
37
  return;
38
38
  }
39
39
  if (method === undefined) {
40
- method = new basic_1.VoidType(className);
40
+ method = basic_1.VoidType.get(className);
41
41
  }
42
42
  }
43
43
  const c = node.findExpressionAfterToken("EXCEPTION");
44
44
  if (c instanceof nodes_1.ExpressionNode && (c.get() instanceof Expressions.SimpleSource2 || c.get() instanceof Expressions.Source)) {
45
- const type = new source_1.Source().runSyntax(c, input);
45
+ const type = source_1.Source.runSyntax(c, input);
46
46
  if (type instanceof basic_1.VoidType) {
47
47
  method = type;
48
48
  }
@@ -57,7 +57,7 @@ class Raise {
57
57
  }
58
58
  }
59
59
  if (method === undefined) {
60
- method = new basic_1.VoidType("Exception");
60
+ method = basic_1.VoidType.get("Exception");
61
61
  }
62
62
  // check parameters vs constructor
63
63
  const param = node.findDirectExpression(Expressions.ParameterListS);
@@ -65,16 +65,16 @@ class Raise {
65
65
  new method_parameters_1.MethodParameters().checkExporting(param, input, method, true);
66
66
  }
67
67
  for (const s of node.findDirectExpressions(Expressions.RaiseWith)) {
68
- new raise_with_1.RaiseWith().runSyntax(s, input);
68
+ raise_with_1.RaiseWith.runSyntax(s, input);
69
69
  }
70
70
  for (const s of node.findDirectExpressions(Expressions.Source)) {
71
- new source_1.Source().runSyntax(s, input);
71
+ source_1.Source.runSyntax(s, input);
72
72
  }
73
73
  for (const s of node.findDirectExpressions(Expressions.SimpleSource2)) {
74
- new source_1.Source().runSyntax(s, input);
74
+ source_1.Source.runSyntax(s, input);
75
75
  }
76
76
  for (const s of node.findDirectExpressions(Expressions.MessageSource)) {
77
- new message_source_1.MessageSource().runSyntax(s, input);
77
+ message_source_1.MessageSource.runSyntax(s, input);
78
78
  }
79
79
  const id = (_d = node.findExpressionAfterToken("ID")) === null || _d === void 0 ? void 0 : _d.concatTokens();
80
80
  let number = (_e = node.findDirectExpression(Expressions.MessageNumber)) === null || _e === void 0 ? void 0 : _e.concatTokens();
@@ -16,7 +16,7 @@ class RaiseEvent {
16
16
  }
17
17
  }
18
18
  for (const s of node.findAllExpressions(Expressions.Source)) {
19
- new source_1.Source().runSyntax(s, input);
19
+ source_1.Source.runSyntax(s, input);
20
20
  }
21
21
  }
22
22
  }
@@ -9,15 +9,15 @@ const basic_1 = require("../../types/basic");
9
9
  class ReadEntities {
10
10
  runSyntax(node, input) {
11
11
  for (const s of node.findDirectExpressions(Expressions.Source)) {
12
- new source_1.Source().runSyntax(s, input);
12
+ source_1.Source.runSyntax(s, input);
13
13
  }
14
14
  for (const t of node.findDirectExpressions(Expressions.Target)) {
15
15
  const inline = t === null || t === void 0 ? void 0 : t.findDirectExpression(Expressions.InlineData);
16
16
  if (inline) {
17
- new inline_data_1.InlineData().runSyntax(inline, input, new basic_1.VoidType("ReadEntities"));
17
+ inline_data_1.InlineData.runSyntax(inline, input, basic_1.VoidType.get("ReadEntities"));
18
18
  }
19
19
  else {
20
- new target_1.Target().runSyntax(t, input);
20
+ target_1.Target.runSyntax(t, input);
21
21
  }
22
22
  }
23
23
  }
@@ -7,10 +7,10 @@ const source_1 = require("../expressions/source");
7
7
  class ReadReport {
8
8
  runSyntax(node, input) {
9
9
  for (const s of node.findDirectExpressions(Expressions.Source)) {
10
- new source_1.Source().runSyntax(s, input);
10
+ source_1.Source.runSyntax(s, input);
11
11
  }
12
12
  for (const t of node.findDirectExpressions(Expressions.Target)) {
13
- new target_1.Target().runSyntax(t, input);
13
+ target_1.Target.runSyntax(t, input);
14
14
  }
15
15
  }
16
16
  }
@@ -18,7 +18,7 @@ class ReadTable {
18
18
  if (firstSource === undefined) {
19
19
  firstSource = sources[0];
20
20
  }
21
- const sourceType = firstSource ? new source_1.Source().runSyntax(firstSource, input) : undefined;
21
+ const sourceType = firstSource ? source_1.Source.runSyntax(firstSource, input) : undefined;
22
22
  if (sourceType === undefined) {
23
23
  const message = "No source type determined, read table";
24
24
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
@@ -35,11 +35,11 @@ class ReadTable {
35
35
  }
36
36
  const components = node.findDirectExpression(Expressions.ComponentCompareSimple);
37
37
  if (components !== undefined) {
38
- new component_compare_simple_1.ComponentCompareSimple().runSyntax(components, input, rowType);
38
+ component_compare_simple_1.ComponentCompareSimple.runSyntax(components, input, rowType);
39
39
  }
40
40
  const indexSource = node.findExpressionAfterToken("INDEX");
41
41
  if (indexSource) {
42
- const indexType = new source_1.Source().runSyntax(indexSource, input);
42
+ const indexType = source_1.Source.runSyntax(indexSource, input);
43
43
  if (new _type_utils_1.TypeUtils(input.scope).isAssignable(indexType, basic_1.IntegerType.get()) === false) {
44
44
  const message = "READ TABLE, INDEX must be simple, got " + (indexType === null || indexType === void 0 ? void 0 : indexType.constructor.name);
45
45
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
@@ -48,7 +48,7 @@ class ReadTable {
48
48
  }
49
49
  const fromSource = node.findExpressionAfterToken("FROM");
50
50
  if (fromSource) {
51
- const fromType = new source_1.Source().runSyntax(fromSource, input);
51
+ const fromType = source_1.Source.runSyntax(fromSource, input);
52
52
  if (new _type_utils_1.TypeUtils(input.scope).isAssignable(fromType, rowType) === false) {
53
53
  const message = "READ TABLE, FROM must be compatible";
54
54
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, fromSource.getFirstToken(), message));
@@ -60,7 +60,7 @@ class ReadTable {
60
60
  if (s === firstSource || s === indexSource || s === fromSource) {
61
61
  continue;
62
62
  }
63
- const type = new source_1.Source().runSyntax(s, input);
63
+ const type = source_1.Source.runSyntax(s, input);
64
64
  if (s === afterKey) {
65
65
  if (type instanceof basic_1.StringType || type instanceof basic_1.TableType || type instanceof basic_1.ObjectReferenceType) {
66
66
  const message = "Key cannot be string or table or reference";
@@ -78,13 +78,13 @@ class ReadTable {
78
78
  const fst = target.findDirectExpression(Expressions.FSTarget);
79
79
  const t = target.findFirstExpression(Expressions.Target);
80
80
  if (inline) {
81
- new inline_data_1.InlineData().runSyntax(inline, input, rowType);
81
+ inline_data_1.InlineData.runSyntax(inline, input, rowType);
82
82
  }
83
83
  else if (fst) {
84
- new fstarget_1.FSTarget().runSyntax(fst, input, rowType);
84
+ fstarget_1.FSTarget.runSyntax(fst, input, rowType);
85
85
  }
86
86
  else if (t) {
87
- const targetType = new target_1.Target().runSyntax(t, input);
87
+ const targetType = target_1.Target.runSyntax(t, input);
88
88
  if (new _type_utils_1.TypeUtils(input.scope).isAssignable(rowType, targetType) === false) {
89
89
  const message = "Incompatible types";
90
90
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));