@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
@@ -16,11 +16,11 @@ const _reference_1 = require("../_reference");
16
16
  const _syntax_input_1 = require("../_syntax_input");
17
17
  const isSimple = /^\w+$/;
18
18
  class Select {
19
- runSyntax(node, input, skipImplicitInto = false) {
19
+ static runSyntax(node, input, skipImplicitInto = false) {
20
20
  var _a;
21
21
  const token = node.getFirstToken();
22
22
  const from = node.findDirectExpression(Expressions.SQLFrom);
23
- const dbSources = from ? new sql_from_1.SQLFrom().runSyntax(from, input) : [];
23
+ const dbSources = from ? sql_from_1.SQLFrom.runSyntax(from, input) : [];
24
24
  if (from === undefined) {
25
25
  const message = `Missing FROM`;
26
26
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
@@ -39,10 +39,10 @@ class Select {
39
39
  const fae = node.findDirectExpression(Expressions.SQLForAllEntries);
40
40
  if (fae) {
41
41
  input.scope.push(_scope_type_1.ScopeType.OpenSQL, "SELECT", token.getStart(), input.filename);
42
- new sql_for_all_entries_1.SQLForAllEntries().runSyntax(fae, input);
42
+ sql_for_all_entries_1.SQLForAllEntries.runSyntax(fae, input);
43
43
  }
44
44
  for (const t of node.findAllExpressions(Expressions.Target)) {
45
- new target_1.Target().runSyntax(t, input);
45
+ target_1.Target.runSyntax(t, input);
46
46
  }
47
47
  // check implicit into, the target field is implict equal to the table name
48
48
  if (skipImplicitInto === false
@@ -68,23 +68,23 @@ class Select {
68
68
  }
69
69
  // OFFSET
70
70
  for (const s of node.findDirectExpressions(Expressions.SQLSource)) {
71
- new sql_source_1.SQLSource().runSyntax(s, input);
71
+ sql_source_1.SQLSource.runSyntax(s, input);
72
72
  }
73
73
  for (const up of node.findDirectExpressions(Expressions.SQLUpTo)) {
74
74
  for (const s of up.findDirectExpressions(Expressions.SQLSource)) {
75
- new sql_source_1.SQLSource().runSyntax(s, input);
75
+ sql_source_1.SQLSource.runSyntax(s, input);
76
76
  }
77
77
  }
78
78
  for (const fae of node.findDirectExpressions(Expressions.SQLForAllEntries)) {
79
79
  for (const s of fae.findDirectExpressions(Expressions.SQLSource)) {
80
- new sql_source_1.SQLSource().runSyntax(s, input);
80
+ sql_source_1.SQLSource.runSyntax(s, input);
81
81
  }
82
82
  }
83
83
  for (const s of node.findAllExpressions(Expressions.SQLCompare)) {
84
- new sql_compare_1.SQLCompare().runSyntax(s, input, dbSources);
84
+ sql_compare_1.SQLCompare.runSyntax(s, input, dbSources);
85
85
  }
86
86
  for (const s of node.findDirectExpressions(Expressions.SQLOrderBy)) {
87
- new sql_order_by_1.SQLOrderBy().runSyntax(s, input);
87
+ sql_order_by_1.SQLOrderBy.runSyntax(s, input);
88
88
  }
89
89
  if (this.isStrictMode(node)) {
90
90
  this.strictModeChecks(node, input);
@@ -94,7 +94,7 @@ class Select {
94
94
  }
95
95
  }
96
96
  // there are multiple rules, but gotta start somewhere
97
- isStrictMode(node) {
97
+ static isStrictMode(node) {
98
98
  const into = node.findDirectExpressionsMulti([Expressions.SQLIntoList, Expressions.SQLIntoStructure, Expressions.SQLIntoTable])[0];
99
99
  const where = node.findDirectExpression(Expressions.SQLCond);
100
100
  // INTO is after WHERE
@@ -118,7 +118,7 @@ class Select {
118
118
  }
119
119
  return false;
120
120
  }
121
- strictModeChecks(node, input) {
121
+ static strictModeChecks(node, input) {
122
122
  const sources = node.findAllExpressions(Expressions.SQLSource);
123
123
  for (const source of sources) {
124
124
  const first = source.getFirstChild();
@@ -135,19 +135,19 @@ class Select {
135
135
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
136
136
  }
137
137
  }
138
- handleInto(node, input, fields, dbSources) {
138
+ static handleInto(node, input, fields, dbSources) {
139
139
  const intoTable = node.findDirectExpression(Expressions.SQLIntoTable);
140
140
  if (intoTable) {
141
141
  const inline = intoTable.findFirstExpression(Expressions.InlineData);
142
142
  if (inline) {
143
- new inline_data_1.InlineData().runSyntax(inline, input, this.buildTableType(fields, dbSources, input.scope));
143
+ inline_data_1.InlineData.runSyntax(inline, input, this.buildTableType(fields, dbSources, input.scope));
144
144
  }
145
145
  }
146
146
  const intoStructure = node.findDirectExpression(Expressions.SQLIntoStructure);
147
147
  if (intoStructure) {
148
148
  for (const inline of intoStructure.findAllExpressions(Expressions.InlineData)) {
149
149
  // todo, for now these are voided
150
- new inline_data_1.InlineData().runSyntax(inline, input, new basic_1.VoidType("SELECT_todo"));
150
+ inline_data_1.InlineData.runSyntax(inline, input, basic_1.VoidType.get("SELECT_todo"));
151
151
  }
152
152
  }
153
153
  const intoList = node.findDirectExpression(Expressions.SQLIntoList);
@@ -169,7 +169,7 @@ class Select {
169
169
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
170
170
  return;
171
171
  }
172
- let type = new basic_1.VoidType("SELECT_todo");
172
+ let type = basic_1.VoidType.get("SELECT_todo");
173
173
  if (isSimple.test(field.code)) {
174
174
  for (const dbSource of dbSources) {
175
175
  if (dbSource === undefined) {
@@ -185,12 +185,12 @@ class Select {
185
185
  }
186
186
  }
187
187
  }
188
- new inline_data_1.InlineData().runSyntax(inline, input, type);
188
+ inline_data_1.InlineData.runSyntax(inline, input, type);
189
189
  }
190
190
  }
191
191
  }
192
192
  }
193
- checkFields(fields, dbSources, input, node) {
193
+ static checkFields(fields, dbSources, input, node) {
194
194
  if (dbSources.length > 1) {
195
195
  return;
196
196
  }
@@ -219,17 +219,17 @@ class Select {
219
219
  }
220
220
  }
221
221
  }
222
- buildTableType(fields, dbSources, scope) {
222
+ static buildTableType(fields, dbSources, scope) {
223
223
  if (dbSources.length !== 1) {
224
- return new basic_1.VoidType("SELECT_todo");
224
+ return basic_1.VoidType.get("SELECT_todo");
225
225
  }
226
226
  if (dbSources[0] === undefined) {
227
227
  // then its a voided table
228
- return new basic_1.VoidType("SELECT_todo");
228
+ return basic_1.VoidType.get("SELECT_todo");
229
229
  }
230
230
  const dbType = dbSources[0].parseType(scope.getRegistry());
231
231
  if (!(dbType instanceof basic_1.StructureType)) {
232
- return new basic_1.VoidType("SELECT_todo");
232
+ return basic_1.VoidType.get("SELECT_todo");
233
233
  }
234
234
  if (fields.length === 1 && fields[0].code === "*") {
235
235
  return new basic_1.TableType(dbType, { withHeader: false, keyType: basic_1.TableKeyType.default }, undefined);
@@ -240,15 +240,15 @@ class Select {
240
240
  for (const field of fields) {
241
241
  const type = dbType.getComponentByName(field.code);
242
242
  if (type === undefined) {
243
- return new basic_1.VoidType("SELECT_todo");
243
+ return basic_1.VoidType.get("SELECT_todo");
244
244
  }
245
245
  components.push({ name: field.code, type });
246
246
  }
247
247
  return new basic_1.TableType(new basic_1.StructureType(components), { withHeader: false, keyType: basic_1.TableKeyType.default }, undefined);
248
248
  }
249
- return new basic_1.VoidType("SELECT_todo");
249
+ return basic_1.VoidType.get("SELECT_todo");
250
250
  }
251
- findFields(node, input) {
251
+ static findFields(node, input) {
252
252
  var _a, _b;
253
253
  let expr = undefined;
254
254
  const ret = [];
@@ -257,7 +257,7 @@ class Select {
257
257
  expr = node.findFirstExpression(Expressions.SQLFieldListLoop);
258
258
  }
259
259
  if (((_a = expr === null || expr === void 0 ? void 0 : expr.getFirstChild()) === null || _a === void 0 ? void 0 : _a.get()) instanceof Expressions.Dynamic) {
260
- new dynamic_1.Dynamic().runSyntax(expr.getFirstChild(), input);
260
+ dynamic_1.Dynamic.runSyntax(expr.getFirstChild(), input);
261
261
  }
262
262
  for (const field of (expr === null || expr === void 0 ? void 0 : expr.findDirectExpressionsMulti([Expressions.SQLField, Expressions.SQLFieldName])) || []) {
263
263
  let code = field.concatTokens().toUpperCase();
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SelectLoop = void 0;
4
4
  const select_1 = require("./select");
5
5
  class SelectLoop {
6
- runSyntax(node, input) {
6
+ static runSyntax(node, input) {
7
7
  // try using the other Select, they should look very much the same
8
- new select_1.Select().runSyntax(node, input);
8
+ select_1.Select.runSyntax(node, input);
9
9
  }
10
10
  }
11
11
  exports.SelectLoop = SelectLoop;
@@ -37,7 +37,7 @@ const assert_error_1 = require("../assert_error");
37
37
  * DATA(bar) = VALUE #( ... ). give error, no type can be derived
38
38
  */
39
39
  class Source {
40
- runSyntax(node, input, targetType, writeReference = false) {
40
+ static runSyntax(node, input, targetType, writeReference = false) {
41
41
  if (node === undefined) {
42
42
  return undefined;
43
43
  }
@@ -56,20 +56,20 @@ class Source {
56
56
  {
57
57
  const method = new _builtin_1.BuiltIn().searchBuiltin(tok);
58
58
  input.scope.addReference(token, method, _reference_1.ReferenceType.BuiltinMethodReference, input.filename);
59
- new cond_1.Cond().runSyntax(node.findDirectExpression(Expressions.Cond), input);
59
+ cond_1.Cond.runSyntax(node.findDirectExpression(Expressions.Cond), input);
60
60
  return basic_1.StringType.get();
61
61
  }
62
62
  case "XSDBOOL":
63
63
  {
64
64
  const method = new _builtin_1.BuiltIn().searchBuiltin(tok);
65
65
  input.scope.addReference(token, method, _reference_1.ReferenceType.BuiltinMethodReference, input.filename);
66
- new cond_1.Cond().runSyntax(node.findDirectExpression(Expressions.Cond), input);
66
+ cond_1.Cond.runSyntax(node.findDirectExpression(Expressions.Cond), input);
67
67
  return new basic_1.CharacterType(1, { qualifiedName: "ABAP_BOOL", ddicName: "ABAP_BOOL" });
68
68
  }
69
69
  case "REDUCE":
70
70
  {
71
71
  const foundType = this.determineType(node, input, targetType);
72
- const bodyType = new reduce_body_1.ReduceBody().runSyntax(node.findDirectExpression(Expressions.ReduceBody), input, foundType);
72
+ const bodyType = reduce_body_1.ReduceBody.runSyntax(node.findDirectExpression(Expressions.ReduceBody), input, foundType);
73
73
  if (foundType === undefined || foundType.isGeneric()) {
74
74
  this.addIfInferred(node, input, bodyType);
75
75
  }
@@ -81,7 +81,7 @@ class Source {
81
81
  case "SWITCH":
82
82
  {
83
83
  const foundType = this.determineType(node, input, targetType);
84
- const bodyType = new switch_body_1.SwitchBody().runSyntax(node.findDirectExpression(Expressions.SwitchBody), input);
84
+ const bodyType = switch_body_1.SwitchBody.runSyntax(node.findDirectExpression(Expressions.SwitchBody), input);
85
85
  if (foundType === undefined || foundType.isGeneric()) {
86
86
  this.addIfInferred(node, input, bodyType);
87
87
  }
@@ -93,7 +93,7 @@ class Source {
93
93
  case "COND":
94
94
  {
95
95
  const foundType = this.determineType(node, input, targetType);
96
- const bodyType = new cond_body_1.CondBody().runSyntax(node.findDirectExpression(Expressions.CondBody), input, foundType);
96
+ const bodyType = cond_body_1.CondBody.runSyntax(node.findDirectExpression(Expressions.CondBody), input, foundType);
97
97
  if (foundType === undefined || foundType.isGeneric()) {
98
98
  this.addIfInferred(node, input, bodyType);
99
99
  }
@@ -110,11 +110,11 @@ class Source {
110
110
  case "CONV":
111
111
  {
112
112
  const foundType = this.determineType(node, input, targetType);
113
- const bodyType = new conv_body_1.ConvBody().runSyntax(node.findDirectExpression(Expressions.ConvBody), input);
113
+ const bodyType = conv_body_1.ConvBody.runSyntax(node.findDirectExpression(Expressions.ConvBody), input);
114
114
  if (new _type_utils_1.TypeUtils(input.scope).isAssignable(foundType, bodyType) === false) {
115
115
  const message = `CONV: Types not compatible, ${foundType === null || foundType === void 0 ? void 0 : foundType.constructor.name}, ${bodyType === null || bodyType === void 0 ? void 0 : bodyType.constructor.name}`;
116
116
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
117
- return new basic_1.VoidType(_syntax_input_1.CheckSyntaxKey);
117
+ return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
118
118
  }
119
119
  this.addIfInferred(node, input, foundType);
120
120
  return foundType;
@@ -122,7 +122,7 @@ class Source {
122
122
  case "REF":
123
123
  {
124
124
  const foundType = this.determineType(node, input, targetType);
125
- const s = new Source().runSyntax(node.findDirectExpression(Expressions.Source), input);
125
+ const s = Source.runSyntax(node.findDirectExpression(Expressions.Source), input);
126
126
  if (foundType === undefined && s) {
127
127
  return new basic_1.DataReference(s);
128
128
  }
@@ -134,7 +134,7 @@ class Source {
134
134
  case "FILTER":
135
135
  {
136
136
  const foundType = this.determineType(node, input, targetType);
137
- const bodyType = new filter_body_1.FilterBody().runSyntax(node.findDirectExpression(Expressions.FilterBody), input, foundType);
137
+ const bodyType = filter_body_1.FilterBody.runSyntax(node.findDirectExpression(Expressions.FilterBody), input, foundType);
138
138
  if (foundType === undefined || foundType.isGeneric()) {
139
139
  this.addIfInferred(node, input, bodyType);
140
140
  }
@@ -151,21 +151,21 @@ class Source {
151
151
  case "CORRESPONDING":
152
152
  {
153
153
  const foundType = this.determineType(node, input, targetType);
154
- new corresponding_body_1.CorrespondingBody().runSyntax(node.findDirectExpression(Expressions.CorrespondingBody), input, foundType);
154
+ corresponding_body_1.CorrespondingBody.runSyntax(node.findDirectExpression(Expressions.CorrespondingBody), input, foundType);
155
155
  this.addIfInferred(node, input, foundType);
156
156
  return foundType;
157
157
  }
158
158
  case "EXACT":
159
159
  {
160
160
  const foundType = this.determineType(node, input, targetType);
161
- new Source().runSyntax(node.findDirectExpression(Expressions.Source), input, foundType);
161
+ Source.runSyntax(node.findDirectExpression(Expressions.Source), input, foundType);
162
162
  this.addIfInferred(node, input, foundType);
163
163
  return foundType;
164
164
  }
165
165
  case "VALUE":
166
166
  {
167
167
  const foundType = this.determineType(node, input, targetType);
168
- const bodyType = new value_body_1.ValueBody().runSyntax(node.findDirectExpression(Expressions.ValueBody), input, foundType);
168
+ const bodyType = value_body_1.ValueBody.runSyntax(node.findDirectExpression(Expressions.ValueBody), input, foundType);
169
169
  if (foundType === undefined || foundType.isGeneric()) {
170
170
  this.addIfInferred(node, input, bodyType);
171
171
  }
@@ -190,32 +190,32 @@ class Source {
190
190
  let hexNext = false;
191
191
  while (children.length >= 0) {
192
192
  if (first instanceof nodes_1.ExpressionNode && first.get() instanceof Expressions.MethodCallChain) {
193
- context = new method_call_chain_1.MethodCallChain().runSyntax(first, input, targetType);
193
+ context = method_call_chain_1.MethodCallChain.runSyntax(first, input, targetType);
194
194
  if (context === undefined) {
195
195
  const message = "Method has no RETURNING value";
196
196
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
197
- return new basic_1.VoidType(_syntax_input_1.CheckSyntaxKey);
197
+ return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
198
198
  }
199
199
  }
200
200
  else if (first instanceof nodes_1.ExpressionNode && first.get() instanceof Expressions.FieldChain) {
201
- context = new field_chain_1.FieldChain().runSyntax(first, input, type);
201
+ context = field_chain_1.FieldChain.runSyntax(first, input, type);
202
202
  }
203
203
  else if (first instanceof nodes_1.ExpressionNode && first.get() instanceof Expressions.StringTemplate) {
204
- context = new string_template_1.StringTemplate().runSyntax(first, input);
204
+ context = string_template_1.StringTemplate.runSyntax(first, input);
205
205
  }
206
206
  else if (first instanceof nodes_1.ExpressionNode && first.get() instanceof Expressions.Source) {
207
- const found = new Source().runSyntax(first, input);
207
+ const found = Source.runSyntax(first, input);
208
208
  context = this.infer(context, found);
209
209
  }
210
210
  else if (first instanceof nodes_1.ExpressionNode && first.get() instanceof Expressions.Constant) {
211
- const found = new constant_1.Constant().runSyntax(first);
211
+ const found = constant_1.Constant.runSyntax(first);
212
212
  context = this.infer(context, found);
213
213
  }
214
214
  else if (first instanceof nodes_1.ExpressionNode && first.get() instanceof Expressions.Dereference) {
215
- context = new dereference_1.Dereference().runSyntax(first, context, input);
215
+ context = dereference_1.Dereference.runSyntax(first, context, input);
216
216
  }
217
217
  else if (first instanceof nodes_1.ExpressionNode && first.get() instanceof Expressions.ComponentChain) {
218
- context = new component_chain_1.ComponentChain().runSyntax(context, first, input);
218
+ context = component_chain_1.ComponentChain.runSyntax(context, first, input);
219
219
  }
220
220
  else if (first instanceof nodes_1.ExpressionNode && first.get() instanceof Expressions.ArithOperator) {
221
221
  if (first.concatTokens() === "**") {
@@ -228,7 +228,7 @@ class Source {
228
228
  }
229
229
  }
230
230
  else if (first instanceof nodes_1.ExpressionNode && first.get() instanceof Expressions.AttributeChain) {
231
- context = new attribute_chain_1.AttributeChain().runSyntax(context, first, input, type);
231
+ context = attribute_chain_1.AttributeChain.runSyntax(context, first, input, type);
232
232
  }
233
233
  if (hexExpected === true) {
234
234
  if (!(context instanceof basic_1.VoidType)
@@ -239,7 +239,7 @@ class Source {
239
239
  && !(context instanceof unknown_type_1.UnknownType)) {
240
240
  const message = "Operator only valid for XSTRING or HEX";
241
241
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
242
- return new basic_1.VoidType(_syntax_input_1.CheckSyntaxKey);
242
+ return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
243
243
  }
244
244
  if (hexNext === false) {
245
245
  hexExpected = false;
@@ -257,13 +257,13 @@ class Source {
257
257
  return context;
258
258
  }
259
259
  ////////////////////////////////
260
- traverseRemainingChildren(children, input) {
260
+ static traverseRemainingChildren(children, input) {
261
261
  const last = children[children.length - 1];
262
262
  if (last && last.get() instanceof Expressions.Source) {
263
- new Source().runSyntax(last, input);
263
+ Source.runSyntax(last, input);
264
264
  }
265
265
  }
266
- infer(context, found) {
266
+ static infer(context, found) {
267
267
  if (context instanceof basic_1.FloatType && found instanceof basic_1.IntegerType) {
268
268
  return context;
269
269
  }
@@ -271,7 +271,7 @@ class Source {
271
271
  return found;
272
272
  }
273
273
  }
274
- addIfInferred(node, input, inferredType) {
274
+ static addIfInferred(node, input, inferredType) {
275
275
  const basic = new basic_types_1.BasicTypes(input);
276
276
  const typeExpression = node.findFirstExpression(Expressions.TypeNameOrInfer);
277
277
  const typeToken = typeExpression === null || typeExpression === void 0 ? void 0 : typeExpression.getFirstToken();
@@ -295,7 +295,7 @@ class Source {
295
295
  }
296
296
  }
297
297
  }
298
- determineType(node, input, targetType) {
298
+ static determineType(node, input, targetType) {
299
299
  const basic = new basic_types_1.BasicTypes(input);
300
300
  const typeExpression = node.findFirstExpression(Expressions.TypeNameOrInfer);
301
301
  const typeToken = typeExpression === null || typeExpression === void 0 ? void 0 : typeExpression.getFirstToken();
@@ -311,7 +311,7 @@ class Source {
311
311
  if (found && found instanceof unknown_type_1.UnknownType) {
312
312
  if (input.scope.getDDIC().inErrorNamespace(typeName) === false) {
313
313
  input.scope.addReference(typeToken, undefined, _reference_1.ReferenceType.VoidType, input.filename);
314
- return new basic_1.VoidType(typeName);
314
+ return basic_1.VoidType.get(typeName);
315
315
  }
316
316
  else {
317
317
  const tid = new _typed_identifier_1.TypedIdentifier(typeToken, input.filename, found);
@@ -322,7 +322,7 @@ class Source {
322
322
  else if (found === undefined) {
323
323
  const message = "Type \"" + typeName + "\" not found in scope, VALUE";
324
324
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
325
- return new basic_1.VoidType(_syntax_input_1.CheckSyntaxKey);
325
+ return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
326
326
  }
327
327
  return found;
328
328
  }
@@ -5,7 +5,7 @@ const basic_1 = require("../../types/basic");
5
5
  const _reference_1 = require("../_reference");
6
6
  const _syntax_input_1 = require("../_syntax_input");
7
7
  class SourceField {
8
- runSyntax(node, input, type, error = true) {
8
+ static runSyntax(node, input, type, error = true) {
9
9
  const token = node.getFirstToken();
10
10
  const name = token.getStr();
11
11
  const found = input.scope.findVariable(name);
@@ -14,7 +14,7 @@ class SourceField {
14
14
  if (error === true) {
15
15
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
16
16
  }
17
- return new basic_1.VoidType(_syntax_input_1.CheckSyntaxKey);
17
+ return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
18
18
  }
19
19
  if (type) {
20
20
  input.scope.addReference(token, found, type, input.filename);
@@ -5,13 +5,13 @@ const basic_1 = require("../../types/basic");
5
5
  const _reference_1 = require("../_reference");
6
6
  const _syntax_input_1 = require("../_syntax_input");
7
7
  class SourceFieldSymbol {
8
- runSyntax(node, input) {
8
+ static runSyntax(node, input) {
9
9
  const token = node.getFirstToken();
10
10
  const found = input.scope.findVariable(token.getStr());
11
11
  if (found === undefined) {
12
12
  const message = "\"" + node.getFirstToken().getStr() + "\" not found, SourceFieldSymbol";
13
13
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
14
- return new basic_1.VoidType(_syntax_input_1.CheckSyntaxKey);
14
+ return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
15
15
  }
16
16
  input.scope.addReference(token, found, _reference_1.ReferenceType.DataReadReference, input.filename);
17
17
  return found.getType();
@@ -9,16 +9,16 @@ const source_1 = require("./source");
9
9
  const sql_in_1 = require("./sql_in");
10
10
  const sql_source_1 = require("./sql_source");
11
11
  class SQLCompare {
12
- runSyntax(node, input, tables) {
12
+ static runSyntax(node, input, tables) {
13
13
  var _a, _b;
14
14
  let sourceType;
15
15
  let token;
16
16
  if (((_a = node.getFirstChild()) === null || _a === void 0 ? void 0 : _a.get()) instanceof Expressions.Dynamic) {
17
- new dynamic_1.Dynamic().runSyntax(node.getFirstChild(), input);
17
+ dynamic_1.Dynamic.runSyntax(node.getFirstChild(), input);
18
18
  return;
19
19
  }
20
20
  for (const s of node.findDirectExpressions(Expressions.SimpleSource3)) {
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.SQLSource)) {
24
24
  for (const child of s.getChildren()) {
@@ -27,11 +27,11 @@ class SQLCompare {
27
27
  break;
28
28
  }
29
29
  }
30
- sourceType = new sql_source_1.SQLSource().runSyntax(s, input);
30
+ sourceType = sql_source_1.SQLSource.runSyntax(s, input);
31
31
  }
32
32
  const sqlin = node.findDirectExpression(Expressions.SQLIn);
33
33
  if (sqlin) {
34
- new sql_in_1.SQLIn().runSyntax(sqlin, input);
34
+ sql_in_1.SQLIn.runSyntax(sqlin, input);
35
35
  }
36
36
  const fieldName = (_b = node.findDirectExpression(Expressions.SQLFieldName)) === null || _b === void 0 ? void 0 : _b.concatTokens();
37
37
  if (fieldName && sourceType && token) {
@@ -69,7 +69,7 @@ class SQLCompare {
69
69
  }
70
70
  }
71
71
  }
72
- findType(fieldName, tables, scope) {
72
+ static findType(fieldName, tables, scope) {
73
73
  for (const t of tables) {
74
74
  const type = t === null || t === void 0 ? void 0 : t.parseType(scope.getRegistry());
75
75
  if (type instanceof basic_1.StructureType) {
@@ -6,13 +6,13 @@ const source_1 = require("./source");
6
6
  const basic_1 = require("../../types/basic");
7
7
  const _syntax_input_1 = require("../_syntax_input");
8
8
  class SQLForAllEntries {
9
- runSyntax(node, input) {
9
+ static runSyntax(node, input) {
10
10
  let s = node.findFirstExpression(Expressions.Source);
11
11
  if (s === undefined) {
12
12
  s = node.findFirstExpression(Expressions.SimpleSource3);
13
13
  }
14
14
  if (s) {
15
- const type = new source_1.Source().runSyntax(s, input);
15
+ const type = source_1.Source.runSyntax(s, input);
16
16
  if (type instanceof basic_1.VoidType) {
17
17
  return;
18
18
  }
@@ -5,16 +5,16 @@ const Expressions = require("../../2_statements/expressions");
5
5
  const dynamic_1 = require("./dynamic");
6
6
  const database_table_1 = require("./database_table");
7
7
  class SQLFrom {
8
- runSyntax(node, input) {
8
+ static runSyntax(node, input) {
9
9
  const ret = [];
10
10
  const fromList = node.findAllExpressions(Expressions.SQLFromSource);
11
11
  for (const from of fromList) {
12
12
  for (const d of from.findAllExpressions(Expressions.Dynamic)) {
13
- new dynamic_1.Dynamic().runSyntax(d, input);
13
+ dynamic_1.Dynamic.runSyntax(d, input);
14
14
  }
15
15
  const dbtab = from.findFirstExpression(Expressions.DatabaseTable);
16
16
  if (dbtab !== undefined) {
17
- ret.push(new database_table_1.DatabaseTable().runSyntax(dbtab, input));
17
+ ret.push(database_table_1.DatabaseTable.runSyntax(dbtab, input));
18
18
  }
19
19
  }
20
20
  return ret;
@@ -6,11 +6,11 @@ const basic_1 = require("../../types/basic");
6
6
  const _syntax_input_1 = require("../_syntax_input");
7
7
  const sql_source_1 = require("./sql_source");
8
8
  class SQLIn {
9
- runSyntax(node, input) {
9
+ static runSyntax(node, input) {
10
10
  if (node.getChildren().length === 2) {
11
11
  const insource = node.findFirstExpression(Expressions.SQLSource);
12
12
  if (insource) {
13
- const intype = new sql_source_1.SQLSource().runSyntax(insource, input);
13
+ const intype = sql_source_1.SQLSource.runSyntax(insource, input);
14
14
  if (intype &&
15
15
  !(intype instanceof basic_1.VoidType) &&
16
16
  !(intype instanceof basic_1.UnknownType) &&
@@ -23,10 +23,10 @@ class SQLIn {
23
23
  return;
24
24
  }
25
25
  for (const s of node.findDirectExpressions(Expressions.SQLSource)) {
26
- new sql_source_1.SQLSource().runSyntax(s, input);
26
+ sql_source_1.SQLSource.runSyntax(s, input);
27
27
  }
28
28
  for (const s of node.findDirectExpressions(Expressions.SQLSourceNoSpace)) {
29
- new sql_source_1.SQLSource().runSyntax(s, input);
29
+ sql_source_1.SQLSource.runSyntax(s, input);
30
30
  }
31
31
  }
32
32
  }
@@ -4,10 +4,10 @@ exports.SQLOrderBy = void 0;
4
4
  const Expressions = require("../../2_statements/expressions");
5
5
  const dynamic_1 = require("./dynamic");
6
6
  class SQLOrderBy {
7
- runSyntax(node, input) {
7
+ static runSyntax(node, input) {
8
8
  const dyn = node.findDirectExpression(Expressions.Dynamic);
9
9
  if (dyn) {
10
- new dynamic_1.Dynamic().runSyntax(dyn, input);
10
+ dynamic_1.Dynamic.runSyntax(dyn, input);
11
11
  }
12
12
  }
13
13
  }
@@ -4,12 +4,12 @@ exports.SQLSource = void 0;
4
4
  const Expressions = require("../../2_statements/expressions");
5
5
  const source_1 = require("./source");
6
6
  class SQLSource {
7
- runSyntax(node, input) {
7
+ static runSyntax(node, input) {
8
8
  for (const s of node.findAllExpressions(Expressions.Source)) {
9
- return new source_1.Source().runSyntax(s, input);
9
+ return source_1.Source.runSyntax(s, input);
10
10
  }
11
11
  for (const s of node.findAllExpressions(Expressions.SimpleSource3)) {
12
- return new source_1.Source().runSyntax(s, input);
12
+ return source_1.Source.runSyntax(s, input);
13
13
  }
14
14
  return undefined;
15
15
  }
@@ -7,27 +7,27 @@ const source_1 = require("./source");
7
7
  const _type_utils_1 = require("../_type_utils");
8
8
  const _syntax_input_1 = require("../_syntax_input");
9
9
  class StringTemplate {
10
- runSyntax(node, input) {
10
+ static runSyntax(node, input) {
11
11
  const typeUtils = new _type_utils_1.TypeUtils(input.scope);
12
12
  const ret = basic_1.StringType.get();
13
13
  for (const templateSource of node.findAllExpressions(Expressions.StringTemplateSource)) {
14
14
  const s = templateSource.findDirectExpression(Expressions.Source);
15
- const type = new source_1.Source().runSyntax(s, input, ret);
15
+ const type = source_1.Source.runSyntax(s, input, ret);
16
16
  if (type === undefined) {
17
17
  const message = "No target type determined";
18
18
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
19
- return new basic_1.VoidType(_syntax_input_1.CheckSyntaxKey);
19
+ return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
20
20
  }
21
21
  else if ((typeUtils.isCharLike(type) === false && typeUtils.isHexLike(type) === false)
22
22
  || type instanceof basic_1.StructureType) {
23
23
  const message = "String template, not character like, " + type.constructor.name;
24
24
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
25
- return new basic_1.VoidType(_syntax_input_1.CheckSyntaxKey);
25
+ return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
26
26
  }
27
27
  const format = templateSource.findDirectExpression(Expressions.StringTemplateFormatting);
28
28
  const formatConcat = format === null || format === void 0 ? void 0 : format.concatTokens();
29
29
  for (const formatSource of (format === null || format === void 0 ? void 0 : format.findAllExpressions(Expressions.Source)) || []) {
30
- new source_1.Source().runSyntax(formatSource, input);
30
+ source_1.Source.runSyntax(formatSource, input);
31
31
  }
32
32
  if (format
33
33
  && (formatConcat === null || formatConcat === void 0 ? void 0 : formatConcat.includes("ALPHA = "))
@@ -41,7 +41,7 @@ class StringTemplate {
41
41
  && !(type instanceof basic_1.AnyType)) {
42
42
  const message = `Cannot apply ALPHA to this type (${type.constructor.name})`;
43
43
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, format.getFirstToken(), message));
44
- return new basic_1.VoidType(_syntax_input_1.CheckSyntaxKey);
44
+ return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
45
45
  }
46
46
  }
47
47
  return ret;
@@ -6,7 +6,7 @@ const source_1 = require("./source");
6
6
  const _syntax_input_1 = require("../_syntax_input");
7
7
  const basic_1 = require("../../types/basic");
8
8
  class SwitchBody {
9
- runSyntax(node, input) {
9
+ static runSyntax(node, input) {
10
10
  if (node === undefined) {
11
11
  return;
12
12
  }
@@ -14,14 +14,14 @@ class SwitchBody {
14
14
  if (!((thenSource === null || thenSource === void 0 ? void 0 : thenSource.get()) instanceof Expressions.Source)) {
15
15
  const message = "SwitchBody, unexpected";
16
16
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
17
- return new basic_1.VoidType(_syntax_input_1.CheckSyntaxKey);
17
+ return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
18
18
  }
19
- const type = new source_1.Source().runSyntax(thenSource, input);
19
+ const type = source_1.Source.runSyntax(thenSource, input);
20
20
  for (const s of node.findDirectExpressions(Expressions.Source)) {
21
21
  if (s === thenSource) {
22
22
  continue;
23
23
  }
24
- new source_1.Source().runSyntax(s, input);
24
+ source_1.Source.runSyntax(s, input);
25
25
  }
26
26
  return type;
27
27
  }