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

9
LINES

< > BotCompany Repo | #1033639 // tok_insertCasts_noReTok

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

Libraryless. Click here for Pure Java version (4678L/26K).

svoid tok_insertCasts_noReTok(LS tok, int start, int end, S var, S type) {
  end = min(end, l(tok));
    
  for (int j = start; j < end; j += 2)
    if (eq(tok.get(j), var) && neqGet(tok, j-2, ".")
      && neqGetOneOf(tok, j+2, "cast", "(")
      && !tok_isAssignment(tok, j+2))
      tok_insertCast(tok, j, type);
}

Author comment

Began life as a copy of #1017552

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1033639
Snippet name: tok_insertCasts_noReTok
Eternal ID of this version: #1033639/2
Text MD5: 326e90cc4f2c0736bb16b378da67ac4e
Transpilation MD5: 864939f1cbedc43248703518fd4d174a
Author: stefan
Category: javax / transpiling
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-12-24 22:04:43
Source code size: 325 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 73 / 118
Version history: 1 change(s)
Referenced in: [show references]