@abaplint/transpiler-cli 2.11.31 → 2.11.33

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 (2) hide show
  1. package/build/bundle.js +31 -13
  2. package/package.json +4 -4
package/build/bundle.js CHANGED
@@ -26695,8 +26695,10 @@ class Select {
26695
26695
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
26696
26696
  return;
26697
26697
  }
26698
+ const isSingle = node.getChildren()[1].concatTokens().toUpperCase() === "SINGLE"
26699
+ || node.get() instanceof Expressions.SelectLoop;
26698
26700
  this.checkFields(fields, dbSources, input, node);
26699
- this.handleInto(node, input, fields, dbSources);
26701
+ this.handleInto(node, input, fields, dbSources, isSingle);
26700
26702
  const fae = node.findDirectExpression(Expressions.SQLForAllEntries);
26701
26703
  if (fae) {
26702
26704
  input.scope.push(_scope_type_1.ScopeType.OpenSQL, "SELECT", token.getStart(), input.filename);
@@ -26796,7 +26798,7 @@ class Select {
26796
26798
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
26797
26799
  }
26798
26800
  }
26799
- static handleInto(node, input, fields, dbSources) {
26801
+ static handleInto(node, input, fields, dbSources, isSingle) {
26800
26802
  const intoTable = node.findDirectExpression(Expressions.SQLIntoTable);
26801
26803
  if (intoTable) {
26802
26804
  const inline = intoTable.findFirstExpression(Expressions.InlineData);
@@ -26806,9 +26808,15 @@ class Select {
26806
26808
  }
26807
26809
  const intoStructure = node.findDirectExpression(Expressions.SQLIntoStructure);
26808
26810
  if (intoStructure) {
26809
- for (const inline of intoStructure.findAllExpressions(Expressions.InlineData)) {
26810
- // todo, for now these are voided
26811
- inline_data_1.InlineData.runSyntax(inline, input, basic_1.VoidType.get("SELECT_todo"));
26811
+ const inlineList = intoStructure.findAllExpressions(Expressions.InlineData);
26812
+ if (inlineList.length === 1 && fields.length === 1 && dbSources.length === 1 && isSingle === false) {
26813
+ inline_data_1.InlineData.runSyntax(inlineList[0], input, this.buildTableType(fields, dbSources, input.scope));
26814
+ }
26815
+ else {
26816
+ for (const inline of inlineList) {
26817
+ // todo, for now these are voided
26818
+ inline_data_1.InlineData.runSyntax(inline, input, basic_1.VoidType.get("SELECT_todo1"));
26819
+ }
26812
26820
  }
26813
26821
  }
26814
26822
  const intoList = node.findDirectExpression(Expressions.SQLIntoList);
@@ -26830,7 +26838,7 @@ class Select {
26830
26838
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
26831
26839
  return;
26832
26840
  }
26833
- let type = basic_1.VoidType.get("SELECT_todo");
26841
+ let type = basic_1.VoidType.get("SELECT_todo2");
26834
26842
  if (isSimple.test(field.code)) {
26835
26843
  for (const dbSource of dbSources) {
26836
26844
  if (dbSource === undefined) {
@@ -26882,15 +26890,15 @@ class Select {
26882
26890
  }
26883
26891
  static buildTableType(fields, dbSources, scope) {
26884
26892
  if (dbSources.length !== 1) {
26885
- return basic_1.VoidType.get("SELECT_todo");
26893
+ return basic_1.VoidType.get("SELECT_todo3");
26886
26894
  }
26887
26895
  if (dbSources[0] === undefined) {
26888
26896
  // then its a voided table
26889
- return basic_1.VoidType.get("SELECT_todo");
26897
+ return basic_1.VoidType.get("SELECT_todo4");
26890
26898
  }
26891
26899
  const dbType = dbSources[0].parseType(scope.getRegistry());
26892
26900
  if (!(dbType instanceof basic_1.StructureType)) {
26893
- return basic_1.VoidType.get("SELECT_todo");
26901
+ return basic_1.VoidType.get("SELECT_todo5");
26894
26902
  }
26895
26903
  if (fields.length === 1 && fields[0].code === "*") {
26896
26904
  return new basic_1.TableType(dbType, { withHeader: false, keyType: basic_1.TableKeyType.default }, undefined);
@@ -26901,13 +26909,13 @@ class Select {
26901
26909
  for (const field of fields) {
26902
26910
  const type = dbType.getComponentByName(field.code);
26903
26911
  if (type === undefined) {
26904
- return basic_1.VoidType.get("SELECT_todo");
26912
+ return basic_1.VoidType.get("SELECT_todo6");
26905
26913
  }
26906
26914
  components.push({ name: field.code, type });
26907
26915
  }
26908
26916
  return new basic_1.TableType(new basic_1.StructureType(components), { withHeader: false, keyType: basic_1.TableKeyType.default }, undefined);
26909
26917
  }
26910
- return basic_1.VoidType.get("SELECT_todo");
26918
+ return basic_1.VoidType.get("SELECT_todo7");
26911
26919
  }
26912
26920
  static findFields(node, input) {
26913
26921
  var _a, _b;
@@ -53747,7 +53755,7 @@ class Registry {
53747
53755
  }
53748
53756
  static abaplintVersion() {
53749
53757
  // magic, see build script "version.sh"
53750
- return "2.113.174";
53758
+ return "2.113.176";
53751
53759
  }
53752
53760
  getDDICReferences() {
53753
53761
  return this.ddicReferences;
@@ -61563,6 +61571,9 @@ ${indentation} output = ${uniqueName}.\n`;
61563
61571
  return false;
61564
61572
  }
61565
61573
  replaceXsdBool(node, lowFile, highSyntax) {
61574
+ if (this.lowReg.getConfig().getVersion() === version_1.Version.OpenABAP) {
61575
+ return undefined;
61576
+ }
61566
61577
  const spag = highSyntax.spaghetti.lookupPosition(node.getFirstToken().getStart(), lowFile.getFilename());
61567
61578
  for (const r of (spag === null || spag === void 0 ? void 0 : spag.getData().references) || []) {
61568
61579
  if (r.referenceType === _reference_1.ReferenceType.BuiltinMethodReference
@@ -65126,6 +65137,7 @@ class InlineDataOldVersions extends _abap_rule_1.ABAPRule {
65126
65137
  runParsed(file) {
65127
65138
  const issues = [];
65128
65139
  if (this.reg.getConfig().getVersion() >= version_1.Version.v740sp02
65140
+ || this.reg.getConfig().getVersion() === version_1.Version.OpenABAP
65129
65141
  || this.reg.getConfig().getVersion() === version_1.Version.Cloud) {
65130
65142
  return [];
65131
65143
  }
@@ -78407,10 +78419,12 @@ class CompareTranspiler {
78407
78419
  }
78408
78420
  const chain = node.findDirectExpression(core_1.Expressions.MethodCallChain);
78409
78421
  if (chain) {
78422
+ const negated = concat.startsWith("NOT ");
78410
78423
  const name = chain.getFirstToken().getStr();
78411
78424
  if (core_1.BuiltIn.isPredicate(name)) {
78412
78425
  // todo, this is not completely correct if there is a method shadowing the name
78413
- return new chunk_1.Chunk().appendString(`abap.compare.eq(` + traversal.traverse(chain).getCode() + `, abap.builtin.abap_true)`);
78426
+ const operator = negated ? 'ne' : 'eq';
78427
+ return new chunk_1.Chunk().appendString(`abap.compare.${operator}(` + traversal.traverse(chain).getCode() + `, abap.builtin.abap_true)`);
78414
78428
  }
78415
78429
  else {
78416
78430
  return new chunk_1.Chunk().appendString(pre + `abap.compare.initial(${traversal.traverse(chain).getCode()}) === false`);
@@ -81915,6 +81929,10 @@ class HandleFUGR {
81915
81929
  runObject(obj, reg) {
81916
81930
  const spaghetti = new abaplint.SyntaxLogic(reg, obj).run().spaghetti;
81917
81931
  const chunk = new chunk_1.Chunk().appendString("{\n");
81932
+ // @ts-ignore todo
81933
+ if (new abaplint.SkipLogic(reg).isGeneratedFunctionGroup(obj)) {
81934
+ return [];
81935
+ }
81918
81936
  for (const file of obj.getSequencedFiles()) {
81919
81937
  if (this.options?.addFilenames === true) {
81920
81938
  chunk.appendString("// " + file.getFilename() + "\n");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler-cli",
3
- "version": "2.11.31",
3
+ "version": "2.11.33",
4
4
  "description": "Transpiler - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -27,10 +27,10 @@
27
27
  "author": "abaplint",
28
28
  "license": "MIT",
29
29
  "devDependencies": {
30
- "@abaplint/core": "^2.113.174",
31
- "@abaplint/transpiler": "^2.11.31",
30
+ "@abaplint/core": "^2.113.176",
31
+ "@abaplint/transpiler": "^2.11.33",
32
32
  "@types/glob": "^8.1.0",
33
- "@types/node": "^24.2.1",
33
+ "@types/node": "^24.3.0",
34
34
  "@types/progress": "^2.0.7",
35
35
  "glob": "=7.2.0",
36
36
  "progress": "^2.0.3",