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

11
LINES

< > BotCompany Repo | #1021870 // tok_autoLongConstants

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

Transpiled version (1772L) is out of date.

1  
static LS tok_autoLongConstants(LS tok) {
2  
  int n = l(tok);
3  
  for (int i = 1 ; i < n; i += 2) {
4  
    S t = tok.get(i);
5  
    if (isInteger(t) && !eq(get(tok, i+2), "L")
6  
      && !eqOneOf(get(tok, i-2), /*"-",*/ /* huh? */ "." /* float/double */)
7  
      && !longIsInt(parseLong(t)))
8  
      tokAppend(tok, i, "L");
9  
  }
10  
  ret tok;
11  
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1021870
Snippet name: tok_autoLongConstants
Eternal ID of this version: #1021870/6
Text MD5: 1be0d75c4fe6b756da789f48cb7ef38b
Author: stefan
Category: javax / transpiling
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-07-03 17:50:17
Source code size: 334 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 369 / 481
Version history: 5 change(s)
Referenced in: [show references]