Transpiled version (4573L) is out of date.
1 | svoid tok_onCleanExit(LS tok) { |
2 | int i; |
3 | while ((i = jfind(tok, "on clean exit {")) >= 0) { |
4 | int iCurly = indexOf(tok, i, "{"); |
5 | int iCurlyEnd = findEndOfBracketPart(tok, iCurly)-1; |
6 | int iRest = iCurlyEnd+2; |
7 | int iEndOfOuterBlock = findEndOfBracketPart(tok, iCurlyEnd)-1; |
8 | |
9 | S code = joinSubList(tok, iCurly, iCurlyEnd+1); |
10 | S var = makeVar(); |
11 | |
12 | tokPrepend_reTok(tok, iEndOfOuterBlock, "} on fail { set \*var*/; } finally { if (!\*var*/) \*code*/ } } "); |
13 | tokReplace_reTok(tok, i, iRest, "{ bool \*var*/; try { "); |
14 | } |
15 | } |
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, ekrmjmnbrukm, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1033031 |
Snippet name: | tok_onCleanExit |
Eternal ID of this version: | #1033031/6 |
Text MD5: | 772f841e1df48ffce10801ed96e1aad6 |
Author: | stefan |
Category: | javax / transpiling |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-10-11 13:41:36 |
Source code size: | 568 bytes / 15 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 207 / 258 |
Version history: | 5 change(s) |
Referenced in: | [show references] |