1 | static S tok_addSemicolon(L<S> tok) { |
2 | //assertOdd(l(tok)); |
3 | S lastToken = get(tok, (l(tok)|1)-2); |
4 | if (eqOneOf(lastToken, "}", ";")) ret join(tok); |
5 | ret join(tok) + ";"; |
6 | } |
7 | |
8 | static S tok_addSemicolon(S s) { |
9 | ret tok_addSemicolon(javaTok(s)); |
10 | } |
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: | 601 / 999 |
Version history: | 2 change(s) |
Referenced in: | [show references] |