@abaplint/core 2.113.174 → 2.113.175

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.
@@ -34,8 +34,9 @@ class Select {
34
34
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
35
35
  return;
36
36
  }
37
+ const isSingle = node.getChildren()[1].concatTokens().toUpperCase() === "SINGLE";
37
38
  this.checkFields(fields, dbSources, input, node);
38
- this.handleInto(node, input, fields, dbSources);
39
+ this.handleInto(node, input, fields, dbSources, isSingle);
39
40
  const fae = node.findDirectExpression(Expressions.SQLForAllEntries);
40
41
  if (fae) {
41
42
  input.scope.push(_scope_type_1.ScopeType.OpenSQL, "SELECT", token.getStart(), input.filename);
@@ -135,7 +136,7 @@ class Select {
135
136
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
136
137
  }
137
138
  }
138
- static handleInto(node, input, fields, dbSources) {
139
+ static handleInto(node, input, fields, dbSources, isSingle) {
139
140
  const intoTable = node.findDirectExpression(Expressions.SQLIntoTable);
140
141
  if (intoTable) {
141
142
  const inline = intoTable.findFirstExpression(Expressions.InlineData);
@@ -145,9 +146,15 @@ class Select {
145
146
  }
146
147
  const intoStructure = node.findDirectExpression(Expressions.SQLIntoStructure);
147
148
  if (intoStructure) {
148
- for (const inline of intoStructure.findAllExpressions(Expressions.InlineData)) {
149
- // todo, for now these are voided
150
- inline_data_1.InlineData.runSyntax(inline, input, basic_1.VoidType.get("SELECT_todo"));
149
+ const inlineList = intoStructure.findAllExpressions(Expressions.InlineData);
150
+ if (inlineList.length === 1 && fields.length === 1 && dbSources.length === 1 && isSingle === false) {
151
+ inline_data_1.InlineData.runSyntax(inlineList[0], input, this.buildTableType(fields, dbSources, input.scope));
152
+ }
153
+ else {
154
+ for (const inline of inlineList) {
155
+ // todo, for now these are voided
156
+ inline_data_1.InlineData.runSyntax(inline, input, basic_1.VoidType.get("SELECT_todo1"));
157
+ }
151
158
  }
152
159
  }
153
160
  const intoList = node.findDirectExpression(Expressions.SQLIntoList);
@@ -169,7 +176,7 @@ class Select {
169
176
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
170
177
  return;
171
178
  }
172
- let type = basic_1.VoidType.get("SELECT_todo");
179
+ let type = basic_1.VoidType.get("SELECT_todo2");
173
180
  if (isSimple.test(field.code)) {
174
181
  for (const dbSource of dbSources) {
175
182
  if (dbSource === undefined) {
@@ -221,15 +228,15 @@ class Select {
221
228
  }
222
229
  static buildTableType(fields, dbSources, scope) {
223
230
  if (dbSources.length !== 1) {
224
- return basic_1.VoidType.get("SELECT_todo");
231
+ return basic_1.VoidType.get("SELECT_todo3");
225
232
  }
226
233
  if (dbSources[0] === undefined) {
227
234
  // then its a voided table
228
- return basic_1.VoidType.get("SELECT_todo");
235
+ return basic_1.VoidType.get("SELECT_todo4");
229
236
  }
230
237
  const dbType = dbSources[0].parseType(scope.getRegistry());
231
238
  if (!(dbType instanceof basic_1.StructureType)) {
232
- return basic_1.VoidType.get("SELECT_todo");
239
+ return basic_1.VoidType.get("SELECT_todo5");
233
240
  }
234
241
  if (fields.length === 1 && fields[0].code === "*") {
235
242
  return new basic_1.TableType(dbType, { withHeader: false, keyType: basic_1.TableKeyType.default }, undefined);
@@ -240,13 +247,13 @@ class Select {
240
247
  for (const field of fields) {
241
248
  const type = dbType.getComponentByName(field.code);
242
249
  if (type === undefined) {
243
- return basic_1.VoidType.get("SELECT_todo");
250
+ return basic_1.VoidType.get("SELECT_todo6");
244
251
  }
245
252
  components.push({ name: field.code, type });
246
253
  }
247
254
  return new basic_1.TableType(new basic_1.StructureType(components), { withHeader: false, keyType: basic_1.TableKeyType.default }, undefined);
248
255
  }
249
- return basic_1.VoidType.get("SELECT_todo");
256
+ return basic_1.VoidType.get("SELECT_todo7");
250
257
  }
251
258
  static findFields(node, input) {
252
259
  var _a, _b;
@@ -67,7 +67,7 @@ class Registry {
67
67
  }
68
68
  static abaplintVersion() {
69
69
  // magic, see build script "version.sh"
70
- return "2.113.174";
70
+ return "2.113.175";
71
71
  }
72
72
  getDDICReferences() {
73
73
  return this.ddicReferences;
@@ -2729,6 +2729,9 @@ ${indentation} output = ${uniqueName}.\n`;
2729
2729
  return false;
2730
2730
  }
2731
2731
  replaceXsdBool(node, lowFile, highSyntax) {
2732
+ if (this.lowReg.getConfig().getVersion() === version_1.Version.OpenABAP) {
2733
+ return undefined;
2734
+ }
2732
2735
  const spag = highSyntax.spaghetti.lookupPosition(node.getFirstToken().getStart(), lowFile.getFilename());
2733
2736
  for (const r of (spag === null || spag === void 0 ? void 0 : spag.getData().references) || []) {
2734
2737
  if (r.referenceType === _reference_1.ReferenceType.BuiltinMethodReference
@@ -32,6 +32,7 @@ class InlineDataOldVersions extends _abap_rule_1.ABAPRule {
32
32
  runParsed(file) {
33
33
  const issues = [];
34
34
  if (this.reg.getConfig().getVersion() >= version_1.Version.v740sp02
35
+ || this.reg.getConfig().getVersion() === version_1.Version.OpenABAP
35
36
  || this.reg.getConfig().getVersion() === version_1.Version.Cloud) {
36
37
  return [];
37
38
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.113.174",
3
+ "version": "2.113.175",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",