Skip to content

compiling and running #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ abap2xlsx
abap2xlsx-demos
open-abap-core
src/abap.ts
src/abap.js
input
output
6 changes: 4 additions & 2 deletions abap.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ function escape(input) {
if (input.charCodeAt(0) === 0xFEFF) {
input = input.substr(1);
}
return input.replaceAll("`", "\\`").replaceAll("${", "\\${").trimEnd();
return input.replaceAll("\\", "\\\\")
.replaceAll("`", "\\`")
.replaceAll("${", "\\${").trimEnd();
}

function add(name, contents) {
Expand Down Expand Up @@ -60,7 +62,7 @@ for (const dirent of fs.readdirSync("abap2xlsx/src", {recursive: true, withFileT

/////////////////////////////////////////

fs.writeFileSync("src/abap.ts", output + "\n};");
fs.writeFileSync("src/abap.js", output + "\n};");
for (const filename in files) {
fs.writeFileSync(path.join("input", filename), files[filename]);
}
1 change: 1 addition & 0 deletions abap_transpile.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"ignoreSyntaxCheck": false,
"addFilenames": true,
"addCommonJS": true,
"skipReposrc": true,
"unknownTypes": "runtimeError",
"skip": []
}
Expand Down
Loading