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

10
LINES

< > BotCompany Repo | #1004240 // tok_addSemicolon

JavaX fragment (include)

static S tok_addSemicolon(L<S> tok) {
  //assertOdd(l(tok));
  S lastToken = get(tok, (l(tok)|1)-2);
  if (eqOneOf(lastToken, "}", ";")) ret join(tok);
  ret join(tok) + ";";
}

static S tok_addSemicolon(S s) {
  ret tok_addSemicolon(javaTok(s));
}

Author comment

Began life as a copy of #1003852

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1004240
Snippet name: tok_addSemicolon
Eternal ID of this version: #1004240/3
Text MD5: eb21c06d8e201049761d7c1cb49654fb
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-04-21 18:10:19
Source code size: 257 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 600 / 998
Version history: 2 change(s)
Referenced in: [show references]