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

9
LINES

< > BotCompany Repo | #1025029 - tok_autoDisposeFields

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

Libraryless. Click here for Pure Java version (2681L/17K).

svoid tok_autoDisposeFields(LS tok) {
  int i = -1;
  while ((i = jfind(tok, i+1, "autoDispose <id>")) >= 0) {
    S var = getVarDeclarationName(subList(tok, i+1));
    tokSet_withReTok(tok, i, "");
    tokPrepend_withReTok(tok, leftScanModifiers(tok, i),
      "void cleanMeUp_" + var + "() { dispose " + var +"; } ");
  }
}

Author comment

Began life as a copy of #1022743

download  show line numbers  debug dex   

Travelled to 2 computer(s): mqqgnosmbjvj, tvejysmllsmz

No comments. add comment

Snippet ID: #1025029
Snippet name: tok_autoDisposeFields
Eternal ID of this version: #1025029/2
Text MD5: 6a42bce100538c6d02e4f387802d72bd
Transpilation MD5: dd1b5c34a63aaefe195c699e8e1d2205
Author: stefan
Category: javax / transpiling
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-09-01 18:55:12
Source code size: 333 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 19 / 38
Version history: 1 change(s)
Referenced in: [show references]

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