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

12
LINES

< > BotCompany Repo | #1006511 - tok_p_repeatWithSleep

JavaX fragment (include)

static void tok_p_repeatWithSleep(L<S> tok) {
  int i;
  while ((i = jfind(tok, "p-repeat with sleep * {")) >= 0) {
    S seconds = tok.get(i+6); // int or id
    int idx = findCodeTokens(tok, i, false, "{");
    int j = findEndOfBracketPart(tok, idx);
    tok.set(i+2, " { ");
    tok.set(j-1, "} }");
    reTok(tok, j-1);
    reTok(tok, i+2);
  }
}

Author comment

Began life as a copy of #1006502

download  show line numbers  debug dex   

Travelled to 11 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz

No comments. add comment

Snippet ID: #1006511
Snippet name: tok_p_repeatWithSleep
Eternal ID of this version: #1006511/1
Text MD5: cee7e82f60d6257881b46fb194fd9c2e
Author: stefan
Category: javax / transpiling
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-01-11 17:02:06
Source code size: 363 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 285 / 317
Referenced in: [show references]

Formerly at http://tinybrain.de/1006511 & http://1006511.tinybrain.de