Libraryless. Click here for Pure Java version (2396L/15K).
// x max= blub(); => x = max(x, blub()); svoid tok_maxEquals(LS tok) { int i; while ((i = jfind(tok, "<id> max=")) >= 0) { S var = tok.get(i); int j = tok_findEndOfExpression(tok, i); replaceTokens(tok, i+2, i+5, "= max(" + var + ","); tokAppend(tok, j-1, ")"); reTok(tok, i+2, j); } }
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1024901 |
Snippet name: | tok_maxEquals - conflicts with float max = ... |
Eternal ID of this version: | #1024901/3 |
Text MD5: | 2856f654bef0928d5349a1ef555406bc |
Transpilation MD5: | fe9a82d9cf7ad258b9d0ecf8d27def61 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-08-29 12:22:20 |
Source code size: | 321 bytes / 11 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 192 / 297 |
Version history: | 2 change(s) |
Referenced in: | [show references] |