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

12
LINES

< > BotCompany Repo | #1027654 - tok_inStringEvals - "the answer is \*1+2*/" etc. / backslash star/asterisk

JavaX fragment (include) [tags: use-pretranspiled]

Transpiled version (2574L) is out of date.

svoid tok_inStringEvals(LS tok) {
  bool change;
  for (int i = 1; i < tok.size(); i += 2) {
    S t = tok.get(i);
    if (!isQuoted(t)) continue;
    if (t.contains("\\*") && !t.contains("\\\\")) { // << rough
      tok.set(i, transpile_inStringEval(t));
      change = true;
    }
  }
  if (change) reTok(tok);
}

download  show line numbers  debug dex   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, xrpafgyirdlv

No comments. add comment

Snippet ID: #1027654
Snippet name: tok_inStringEvals - "the answer is \*1+2*/" etc. / backslash star/asterisk
Eternal ID of this version: #1027654/3
Text MD5: 3d39996dd75ddd2003abfdd62985baa1
Author: stefan
Category: javax / transpiling
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-11-13 11:58:49
Source code size: 325 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 31 / 55
Version history: 2 change(s)
Referenced in: [show references]

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