Transpiled version (3620L) is out of date.
1 | svoid tok_ifNullAssign(LS tok) { |
2 | for (int i : jfindAll_reversed(tok, "return <id> if null =")) { |
3 | S var = tok.get(i+2); |
4 | int iEnd = findEndOfStatement(tok, i); |
5 | tok.set(iEnd-1, "; return \*var*/; }"); |
6 | replaceTokens(tok, i, i+5*2-1, |
7 | "{ if (\*var*/ == null) \*var*/ ="); |
8 | } |
9 | |
10 | jreplace(tok, "<id> if null =", "if ($1 == null) $1 ="); |
11 | } |
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
Snippet ID: | #1030764 |
Snippet name: | tok_ifNullAssign |
Eternal ID of this version: | #1030764/6 |
Text MD5: | f8e4ec9ebdb98df0d99e9813a47f6095 |
Author: | stefan |
Category: | javax / transpilation |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-03-19 15:29:48 |
Source code size: | 369 bytes / 11 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 162 / 261 |
Version history: | 5 change(s) |
Referenced in: | [show references] |