@abaplint/transpiler 2.13.15 → 2.13.17

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.
@@ -765,6 +765,25 @@ this.INTERNAL_ID = abap.internalIdCounter++;\n`;
765
765
  static setValues(identifier, name) {
766
766
  const val = identifier.getValue();
767
767
  let ret = "";
768
+ // abaplint can use this sentinel for enum-like class constants. Synthesize
769
+ // deterministic member values so the enum fields have distinct runtime values.
770
+ if (val === "novalueClassAttributeEnum") {
771
+ const type = identifier.getType();
772
+ if (type instanceof abaplint.BasicTypes.StructureType) {
773
+ let index = 0;
774
+ for (const component of type.getComponents()) {
775
+ const fieldName = component.name.toLowerCase();
776
+ ret += Traversal.prefixVariable(name)
777
+ + ".get()["
778
+ + JSON.stringify(fieldName)
779
+ + "].set("
780
+ + index
781
+ + ");\n";
782
+ index++;
783
+ }
784
+ }
785
+ return ret;
786
+ }
768
787
  const handle = (val, name) => {
769
788
  if (typeof val === "string") {
770
789
  const e = expressions_1.ConstantTranspiler.escape(val);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler",
3
- "version": "2.13.15",
3
+ "version": "2.13.17",
4
4
  "description": "Transpiler",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/src/index.d.ts",
@@ -29,7 +29,7 @@
29
29
  "author": "abaplint",
30
30
  "license": "MIT",
31
31
  "dependencies": {
32
- "@abaplint/core": "^2.119.1",
32
+ "@abaplint/core": "^2.119.11",
33
33
  "source-map": "^0.7.6"
34
34
  },
35
35
  "devDependencies": {