static S dollarVarsToStars_underscoresWithDollarQ(S s) { ret dollarVarsToStars_underscoresWithDollarQ(s, null); } static S dollarVarsToStars_underscoresWithDollarQ(S s, L<S> varNames_out) { ret join(dollarVarsToStars_underscoresWithDollarQ(javaTok(s), varNames_out)); } static L<S> dollarVarsToStars_underscoresWithDollarQ(L<S> tok, L<S> varNames_out) { for (int i = 1; i < l(tok); i += 2) { S t = tok.get(i); if (isDollarVar(t)) { listAdd(varNames_out, t); tok.set(i, t.startsWith("$_q_") ? "*" // "quoted" var : joinWithSpace(rep("*", underscoreWordCount(t)))); } else if (eq(t, "*")) listAdd(varNames_out, "*"); } ret tok; }
Began life as a copy of #1017693
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1017847 |
Snippet name: | dollarVarsToStars_underscoresWithDollarQ |
Eternal ID of this version: | #1017847/1 |
Text MD5: | 240159110531e4253baee1cf265159c1 |
Author: | stefan |
Category: | javax / parsing |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-08-17 13:17:04 |
Source code size: | 709 bytes / 21 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 324 / 345 |
Referenced in: | [show references] |