Libraryless. Click here for Pure Java version (3614L/24K/80K).
!752 !include #1004828 // Java Analysis sS snippetID = "#1004812"; p { loadConcepts(); autoSaveConcepts(); deleteAll(JavaToken.class); // load snippet (SSnippet) if we don't have it yet ensureHas(SSnippet.class, r { new SSnippet s; s.snippetID = snippetID; s.grabbedWhen = now(); s.text = loadSnippet(snippetID); }); // Do a javaTok on every snippet ensureHas(SSnippet.class, JavaTok.class, voidfunc(SSnippet s) { new JavaTok j; j.onSnippet.set(s); assertNotNull(s.text); j.text = s.text; j.tok = javaTok(s.text); }); // Make the tokens forEvery(JavaTok.class, voidfunc(JavaTok j) { if (j.tok == null) ret; // Find existing tokens Map<Int, JavaToken> tokens = indexByField(findBackRefs(j, JavaToken.class), "index"); // Let's just do the C tokens int charIndex = 0; for (int i = 0; i < l(j.tok); i++) { if (odd(i) && tokens.get(i) == null) new JavaToken(j, i, charIndex); charIndex += l(j.tok.get(i)); } }); }
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: | #1004820 |
Snippet name: | Java Analysis AI (dev.) |
Eternal ID of this version: | #1004820/1 |
Text MD5: | ff8e1ef96e62f3a2adc21a2d57d2024f |
Transpilation MD5: | 2ccfcca94a22f5f3bf9d6f08c850fab5 |
Author: | stefan |
Category: | javax |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-09-05 15:31:03 |
Source code size: | 1112 bytes / 50 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 647 / 1273 |
Referenced in: | #1004829 - Show Tokens [pre-experiment] #1004836 - Show Tokens #1004837 - Test Loading Unknown Concepts [WORKS] |