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

16
LINES

< > BotCompany Repo | #1010854 // dollarVarsToStars

JavaX fragment (include)

static S dollarVarsToStars(S s) {
  ret dollarVarsToStars(s, null);
}

static S dollarVarsToStars(S s, L<S> varNames_out) {
  L<S> tok = javaTok(s);
  for (int i = 1; i < l(tok); i += 2) {
    S t = tok.get(i);
    if (isDollarVar(t)) {
      listAdd(varNames_out, t);
      tok.set(i, "*");
    } else if (eq(t, "*"))
      listAdd(varNames_out, "*");
  }
  ret join(tok);
}

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: #1010854
Snippet name: dollarVarsToStars
Eternal ID of this version: #1010854/5
Text MD5: 2c518f547c28ed1db148bbdb8ab354b7
Author: stefan
Category: javax / parsing
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-10-04 22:39:29
Source code size: 394 bytes / 16 lines
Pitched / IR pitched: No / No
Views / Downloads: 442 / 470
Version history: 4 change(s)
Referenced in: [show references]