@abaplint/transpiler 2.13.3 → 2.13.5
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.
package/build/src/rearranger.js
CHANGED
|
@@ -108,7 +108,7 @@ class Rearranger {
|
|
|
108
108
|
return;
|
|
109
109
|
}
|
|
110
110
|
let splitAt;
|
|
111
|
-
//
|
|
111
|
+
// lowest precedence: +, - (skip **, *, /, MOD, DIV)
|
|
112
112
|
for (let i = arith.length - 1; i >= 0; i--) {
|
|
113
113
|
const a = arith[i];
|
|
114
114
|
const concat = a.concatTokens().toUpperCase();
|
|
@@ -122,7 +122,19 @@ class Rearranger {
|
|
|
122
122
|
splitAt = a;
|
|
123
123
|
break;
|
|
124
124
|
}
|
|
125
|
-
//
|
|
125
|
+
// medium precedence: *, /, MOD, DIV (skip only **)
|
|
126
|
+
if (splitAt === undefined) {
|
|
127
|
+
for (let i = arith.length - 1; i >= 0; i--) {
|
|
128
|
+
const a = arith[i];
|
|
129
|
+
const concat = a.concatTokens().toUpperCase();
|
|
130
|
+
if (concat === "**") {
|
|
131
|
+
continue;
|
|
132
|
+
}
|
|
133
|
+
splitAt = a;
|
|
134
|
+
break;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
// fallback: all ** operators
|
|
126
138
|
if (splitAt === undefined) {
|
|
127
139
|
splitAt = arith[arith.length - 1];
|
|
128
140
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler",
|
|
3
|
-
"version": "2.13.
|
|
3
|
+
"version": "2.13.5",
|
|
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.118.
|
|
32
|
+
"@abaplint/core": "^2.118.8",
|
|
33
33
|
"source-map": "^0.7.6"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|