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

9
LINES

< > BotCompany Repo | #1034379 // tok_quickNewArray

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

Transpiled version (5909L) is out of date.

svoid tok_quickNewArray(LS tok) {
  jreplace_dyn_allowDollarRefs(tok, "[] <id> = new[", 
    cIdx -> {
      int iTypeStart = tok_leftScanType(tok, cIdx);
      S type = joinSubList(tok, iTypeStart, cIdx-1);
      ret "[] $3 = new " + type + "[";
    }
  );
}

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1034379
Snippet name: tok_quickNewArray
Eternal ID of this version: #1034379/6
Text MD5: 0755ed17ef6184c95b7d7fb57d8c8b36
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-02-04 16:30:18
Source code size: 267 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 133 / 220
Version history: 5 change(s)
Referenced in: [show references]