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

10
LINES

< > BotCompany Repo | #1001161 - getVarDeclarationName

JavaX fragment (include)

 static S getVarDeclarationName(L<S> tok) {
    int j = 1;
    L<S> special = litlist("=", "{", ";");
    while (j < tok.size() && !special.contains(tok.get(j)))
      j += 2;
    j -= 2;
    while (j > 1 && litlist("[", "]").contains(tok.get(j)))
      j -= 2;
    return tok.get(j);
  }

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: #1001161
Snippet name: getVarDeclarationName
Eternal ID of this version: #1001161/1
Text MD5: 3f85bf1d0fb782d69b9f060cd215f7f0
Author: stefan
Category:
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2015-09-24 23:49:13
Source code size: 297 bytes / 10 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 408 / 518
Referenced in: [show references]

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