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

11
LINES

< > BotCompany Repo | #1007593 // tok_expandVarCopies

JavaX fragment (include)

// +var => "var", +var
static void tok_expandVarCopies(L<S> tok) {
  for (int i = 3; i+2 < l(tok); i += 2) {
    if (!eq(tok.get(i), "+")) continue;
    if (!eqOneOf(tok.get(i-2), "(", ",", "{")) continue;
    S s = tok.get(i+2);
    if (!isIdentifier(s)) continue;
    tok.set(i, quote(s) + ", ");
    reTok(tok, i, i+1);
  }
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1007593
Snippet name: tok_expandVarCopies
Eternal ID of this version: #1007593/1
Text MD5: 7cf1f8f33bf036f065a6d57fbb5d80c2
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-03-27 17:57:11
Source code size: 340 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 587 / 594
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)