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

15
LINES

< > BotCompany Repo | #1001886 // "pcall {" (JavaX translator, shorter version)

JavaX translator [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (342L/3K/9K).

1  
// Syntax: pcall { doFunnyStuff(); }
2  
// Replaced with: try { doFunnyStuff(); } catch etc.
3  
4  
!752
5  
6  
p {
7  
  L<S> tok = tokMainJava();
8  
  
9  
  tok = replaceKeywordBlock(tok,
10  
    "pcall", // keyword to match
11  
    "try {", // beginning of replacement block
12  
    "} catch (Throwable __e) { printStackTrace(__e); }"); // end of replacement block
13  
    
14  
  saveMainJava(tok);
15  
}

Author comment

Began life as a copy of #1001188

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1001886
Snippet name: "pcall {" (JavaX translator, shorter version)
Eternal ID of this version: #1001886/1
Text MD5: 5f1597bb9e3c3cb0bdd5ecc0971e5c82
Transpilation MD5: 6d3eacbb42db20fd4d1a95c8845e1240
Author: stefan
Category:
Type: JavaX translator
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-01-21 17:25:30
Source code size: 374 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 783 / 3909
Referenced in: [show references]