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

8
LINES

< > BotCompany Repo | #1028907 // tok_shortMethodReferences

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

Libraryless. Click here for Pure Java version (3236L/20K).

// e.g. (::bla) => (main::bla)
svoid tok_shortMethodReferences(LS tok) {
  jreplace(tok, "::", "main::", tokCondition {
    S next = _get(tok, i+5);
    ret i > 0 && !isIdentifier(_get(tok, i-1))
      && (eq(next, "<") || isIdentifier(next));
  });
}

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1028907
Snippet name: tok_shortMethodReferences
Eternal ID of this version: #1028907/4
Text MD5: 7bfa26881c1204bb41a0cba7dd63dd84
Transpilation MD5: e018302e076f5002949d84f3bf26536f
Author: stefan
Category: javax / transpiling
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-09-25 18:27:25
Source code size: 258 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 246 / 362
Version history: 3 change(s)
Referenced in: [show references]