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

11
LINES

< > TinyBrain | #1003865 - findTranslators2 - the good one using tokens

JavaX fragment (include)

// probably better than findTranslators (uses tokens)
// removes invocations from src
static S findTranslators2(S src, L<S> libsOut) {
  L<S> tok = javaTok(src);
  int i;
  while ((i = jfind(tok, "!<int>")) >= 0) {
    setAdd(libsOut, tok.get(i+2));
    clearTokens(tok, i, i+3);
  }
  ret join(tok);
}

download  show line numbers  debug dex   

Travelled to 4 computer(s): cfunsshuasjs, ddnzoavkxhuk, onxytkatvevr, tvejysmllsmz

No comments. add comment

Snippet ID: #1003865
Snippet name: findTranslators2 - the good one using tokens
Eternal ID of this version: #1003865/2
Text MD5: a3bcb7d61f8ce4bfe5d46311a84bd553
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-09-13 16:28:13
Source code size: 312 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 111 / 80
Version history: 1 change(s)
Referenced in: [show]