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

11
LINES

< > BotCompany Repo | #1024937 - tok_questionDot

JavaX fragment (include)

svoid tok_questionDot(LS tok) {
  jreplace(tok, "<id> ?.", "if ($1 != null) $1.");
  /*int i;
  while ((i = jfind(tok, "<id> ?.")) {
    S var = tok.get(i);
    int j = findEndOfStatement(tok, i);
    int dot = indexOf(tok, i, ".");
    tok.set(i+2, "");
    replaceTokens(tok, i, dot+1, "if (" + var + " != null) var.");
  }*/
}

download  show line numbers  debug dex   

Travelled to 2 computer(s): mqqgnosmbjvj, tvejysmllsmz

No comments. add comment

Snippet ID: #1024937
Snippet name: tok_questionDot
Eternal ID of this version: #1024937/1
Text MD5: 08e431166febd76590f4b861c97fde53
Author: stefan
Category: javax / transpiling
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-08-31 03:14:37
Source code size: 339 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 9 / 15
Referenced in: [show references]

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