Libraryless. Click here for Pure Java version (4519L/26K).
1 | // S name from req; => S name = req?.get("name"); |
2 | svoid tok_getFromMap(LS tok) { |
3 | int i; |
4 | jreplace_dyn_allowNull(tok, "<id> <id> from <id>;", |
5 | (_tok, start, end) -> { |
6 | S type = tok.get(start); |
7 | S var = tok.get(start+2); |
8 | S map = tok.get(start+6); |
9 | ret type + " " + var + " = " + map + "?.get(" + quote(var) + ");"; |
10 | }); |
11 | } |
Began life as a copy of #1031876
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1032536 |
Snippet name: | tok_getFromMap |
Eternal ID of this version: | #1032536/5 |
Text MD5: | a26e5adee315980fd08b5f9e6d924b57 |
Transpilation MD5: | bdf3286f7efe97a6c37349ba3d7ea3cb |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-09-20 17:57:51 |
Source code size: | 363 bytes / 11 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 191 / 243 |
Version history: | 4 change(s) |
Referenced in: | [show references] |