Libraryless. Click here for Pure Java version (2647L/17K).
1 | static L<ParsedWithTokens<S>> pwt_fromTokenization(LS tok) { |
2 | new L<ParsedWithTokens<S>> out; |
3 | for i over tok: { |
4 | S t = tok.get(i); |
5 | // slightly abusing the spec of ParsedWithTokens by pointing to only 1 token (C or N) |
6 | out.add(ParsedWithTokens(t, tok, i, i+1)); |
7 | } |
8 | ret out; |
9 | } |
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1028842 |
Snippet name: | pwt_fromTokenization |
Eternal ID of this version: | #1028842/5 |
Text MD5: | c8ba9382385d1a0c1ca2af6cfdd2b031 |
Transpilation MD5: | b6621f5054eb14fee6d84779b7d864f6 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-07-09 18:00:25 |
Source code size: | 298 bytes / 9 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 229 / 328 |
Version history: | 4 change(s) |
Referenced in: | [show references] |