1 | static L<S> tok_mergeInts(L<S> tok) { |
2 | for (int i = 1; i+2 < l(tok); i++) { |
3 | S t; |
4 | if (eqGet(tok, i, "-") && eqGet(tok, i+1, "") && isInteger(t = tok.get(i+2))) { |
5 | tok.remove(i--); |
6 | tok.remove(i--); |
7 | tok.set(i, "-" + t); |
8 | } |
9 | } |
10 | ret tok; |
11 | } |
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1008958 |
Snippet name: | tok_mergeInts - merge integer constants into one token ("-1") |
Eternal ID of this version: | #1008958/2 |
Text MD5: | 11ab2410b4399d443b3714e2f3a7c908 |
Author: | stefan |
Category: | javax / parsing |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-06-20 01:19:47 |
Source code size: | 275 bytes / 11 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 521 / 576 |
Version history: | 1 change(s) |
Referenced in: | [show references] |