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

12
LINES

< > BotCompany Repo | #1010092 - tok_findImports

JavaX fragment (include)

static List<String> tok_findImports(L<S> tok) {
  new L<S> imports;
  int n = l(tok);
  for (int i = 1; i < n; i += 2)
    if (eq(tok.get(i), "import")) {
      int j = indexOf(tok, ";", i+2);
      if (j < 0) break;
      imports.add(joinCodeTokens(subList(tok, i-1, j)));
      i = j;
    }
  ret imports;
}

Author comment

Began life as a copy of #1002768

download  show line numbers  debug dex   

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

No comments. add comment

Snippet ID: #1010092
Snippet name: tok_findImports
Eternal ID of this version: #1010092/2
Text MD5: d929d03637c15f66c378f5fe75776708
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-09-02 14:10:31
Source code size: 320 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 216 / 238
Version history: 1 change(s)
Referenced in: [show references]

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