Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

22
LINES

< > BotCompany Repo | #1001188 // "pcall {" (JavaX translator, NOT the one used)

JavaX translator [tags: use-pretranspiled]

Transpiled version (262L) is out of date.

1  
// Syntax: pcall { doFunnyStuff(); }
2  
3  
!747
4  
5  
m {
6  
  p {
7  
    L<S> tok = javaTok(loadMainJava());
8  
    
9  
    for (int i = 0; i < 100; i++) {
10  
      int idx = findCodeTokens(tok, "pcall", "{");
11  
      if (idx < 0)
12  
        break;
13  
      int j = findEndOfBracketPart(tok, idx+2);
14  
      
15  
      tok.set(idx, "try");
16  
      tok.set(j-1, "} catch (Throwable __e) { printStackTrace(e); }");
17  
    }
18  
    
19  
    saveMainJava(join(tok));
20  
  }
21  
22  
}

Author comment

Began life as a copy of #1000805

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1001188
Snippet name: "pcall {" (JavaX translator, NOT the one used)
Eternal ID of this version: #1001188/1
Text MD5: 0d5cc6fdcd329c623ca799b80a961a85
Author: stefan
Category:
Type: JavaX translator
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-01-04 01:08:58
Source code size: 440 bytes / 22 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 733 / 1128
Referenced in: [show references]