Skip to content

Commit

Permalink
compiling and running (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
larshp authored Sep 9, 2024
1 parent 8cbae96 commit a8f85a4
Show file tree
Hide file tree
Showing 11 changed files with 338 additions and 13 deletions.
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

0 comments on commit a8f85a4

Please sign in to comment.