@abaplint/transpiler-cli 2.11.86 → 2.11.88
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/bundle.js +62 -2
- package/package.json +2 -2
package/build/bundle.js
CHANGED
|
@@ -87986,6 +87986,12 @@ const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/
|
|
|
87986
87986
|
const unique_identifier_1 = __webpack_require__(/*! ../unique_identifier */ "./node_modules/@abaplint/transpiler/build/src/unique_identifier.js");
|
|
87987
87987
|
class RaiseTranspiler {
|
|
87988
87988
|
transpile(node, traversal) {
|
|
87989
|
+
if (node.findDirectTokenByText("RESUMABLE")) {
|
|
87990
|
+
throw new Error("RaiseTranspiler, RESUMABLE not implemented");
|
|
87991
|
+
}
|
|
87992
|
+
else if (node.findDirectTokenByText("SHORTDUMP")) {
|
|
87993
|
+
throw new Error("RaiseTranspiler, SHORTDUMP not implemented");
|
|
87994
|
+
}
|
|
87989
87995
|
const classNameToken = node.findFirstExpression(abaplint.Expressions.ClassName)?.getFirstToken();
|
|
87990
87996
|
const className = classNameToken?.getStr();
|
|
87991
87997
|
if (className === undefined) {
|
|
@@ -88008,8 +88014,61 @@ class RaiseTranspiler {
|
|
|
88008
88014
|
const extra = `{"INTERNAL_FILENAME": "${traversal.getFilename()}","INTERNAL_LINE": ${node.getStart().getRow()}}`;
|
|
88009
88015
|
const lookup = traversal.lookupClassOrInterface(classNameToken?.getStr(), classNameToken);
|
|
88010
88016
|
const id = unique_identifier_1.UniqueIdentifier.get();
|
|
88011
|
-
|
|
88012
|
-
|
|
88017
|
+
const messageSource = node.findDirectExpression(abaplint.Expressions.MessageSource);
|
|
88018
|
+
let pre = "";
|
|
88019
|
+
let post = "";
|
|
88020
|
+
if (messageSource) {
|
|
88021
|
+
let msgid = messageSource.findDirectExpression(abaplint.Expressions.MessageClass)?.concatTokens().toUpperCase();
|
|
88022
|
+
if (msgid === undefined) {
|
|
88023
|
+
msgid = traversal.traverse(messageSource.findExpressionAfterToken("ID")).getCode();
|
|
88024
|
+
}
|
|
88025
|
+
else {
|
|
88026
|
+
msgid = `'${msgid}'`;
|
|
88027
|
+
}
|
|
88028
|
+
let msgno = messageSource.findDirectExpression(abaplint.Expressions.MessageTypeAndNumber)?.concatTokens().substring(1);
|
|
88029
|
+
if (msgno === undefined) {
|
|
88030
|
+
msgno = traversal.traverse(messageSource.findExpressionAfterToken("NUMBER")).getCode();
|
|
88031
|
+
}
|
|
88032
|
+
else {
|
|
88033
|
+
msgno = `'${msgno}'`;
|
|
88034
|
+
}
|
|
88035
|
+
let msgty = messageSource.findDirectExpression(abaplint.Expressions.MessageTypeAndNumber)?.concatTokens().substring(0, 1).toUpperCase();
|
|
88036
|
+
if (msgty === undefined) {
|
|
88037
|
+
msgty = traversal.traverse(messageSource.findExpressionAfterToken("TYPE")).getCode();
|
|
88038
|
+
}
|
|
88039
|
+
else {
|
|
88040
|
+
msgty = `'${msgty}'`;
|
|
88041
|
+
}
|
|
88042
|
+
const textid = unique_identifier_1.UniqueIdentifier.get();
|
|
88043
|
+
pre = `const ${textid} = new abap.types.Structure({
|
|
88044
|
+
"msgid": new abap.types.Character(20, {}),
|
|
88045
|
+
"msgno": new abap.types.Numc({length: 3}),
|
|
88046
|
+
"attr1": new abap.types.Character(255, {}),
|
|
88047
|
+
"attr2": new abap.types.Character(255, {}),
|
|
88048
|
+
"attr3": new abap.types.Character(255, {}),
|
|
88049
|
+
"attr4": new abap.types.Character(255, {})}, "SCX_T100KEY", "SCX_T100KEY", {}, {});
|
|
88050
|
+
${textid}.get().msgid.set(${msgid});
|
|
88051
|
+
${textid}.get().msgno.set(${msgno});
|
|
88052
|
+
${textid}.get().attr1.set('IF_T100_DYN_MSG~MSGV1');
|
|
88053
|
+
${textid}.get().attr2.set('IF_T100_DYN_MSG~MSGV2');
|
|
88054
|
+
${textid}.get().attr3.set('IF_T100_DYN_MSG~MSGV3');
|
|
88055
|
+
${textid}.get().attr4.set('IF_T100_DYN_MSG~MSGV4');
|
|
88056
|
+
`;
|
|
88057
|
+
if (p === "") {
|
|
88058
|
+
p = `{"textid": ${textid}}`;
|
|
88059
|
+
}
|
|
88060
|
+
else {
|
|
88061
|
+
p = `{...${p}, "textid": ${textid}}`;
|
|
88062
|
+
}
|
|
88063
|
+
post = `\n${id}.if_t100_dyn_msg$msgty?.set(${msgty});`;
|
|
88064
|
+
let count = 1;
|
|
88065
|
+
for (const w of node.findDirectExpression(abaplint.Expressions.RaiseWith)?.findDirectExpressions(abaplint.Expressions.Source) || []) {
|
|
88066
|
+
post += `\n${id}.if_t100_dyn_msg$msgv${count}?.set(${traversal.traverse(w).getCode()});`;
|
|
88067
|
+
count++;
|
|
88068
|
+
}
|
|
88069
|
+
}
|
|
88070
|
+
return new chunk_1.Chunk().append(pre + `const ${id} = await (new ${lookup}()).constructor_(${p});
|
|
88071
|
+
${id}.EXTRA_CX = ${extra};${post}
|
|
88013
88072
|
throw ${id};`, node, traversal);
|
|
88014
88073
|
}
|
|
88015
88074
|
}
|
|
@@ -92603,6 +92662,7 @@ exports.config = {
|
|
|
92603
92662
|
"OA2P",
|
|
92604
92663
|
"PARA",
|
|
92605
92664
|
"PROG",
|
|
92665
|
+
"WAPA",
|
|
92606
92666
|
"SHLP",
|
|
92607
92667
|
"SHMA",
|
|
92608
92668
|
"SICF",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler-cli",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.88",
|
|
4
4
|
"description": "Transpiler - Command Line Interface",
|
|
5
5
|
"funding": "https://github.com/sponsors/larshp",
|
|
6
6
|
"bin": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@abaplint/core": "^2.113.200",
|
|
31
|
-
"@abaplint/transpiler": "^2.11.
|
|
31
|
+
"@abaplint/transpiler": "^2.11.88",
|
|
32
32
|
"@types/glob": "^8.1.0",
|
|
33
33
|
"@types/node": "^24.3.1",
|
|
34
34
|
"@types/progress": "^2.0.7",
|