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

11
LINES

< > BotCompany Repo | #1031356 // tok_doPing

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (3582L/21K).

svoid tok_doPing(LS tok) {
  jreplace(tok, "do ping {", "do { ping();");
  
  int i;
  while ((i = jfind(tok, "do ping <id>")) >= 0) {
    int j = tok_findEndOfStatement(tok, i+4);
    tok.set(i+2, "{ ping();");
    tokAppend(tok, j-1, " }");
    reTok(tok, i, j);
  }
}

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1031356
Snippet name: tok_doPing
Eternal ID of this version: #1031356/4
Text MD5: 3be12a038301e98c0a50af605b5a8916
Transpilation MD5: 6c263e5fc4774b3a79f1f5ea1252109e
Author: stefan
Category: javax / transpiling
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-06-07 04:05:49
Source code size: 280 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 183 / 269
Version history: 3 change(s)
Referenced in: [show references]