Download Jar. Libraryless. Click here for Pure Java version (2791L/20K).
!7 p { S src = loadSnippet(#1006722); // nice complicated Java source parse(javaTok(src)); } svoid parse(L<S> tok) { for (L<S> tClass : allClasses(tok)) { S className = getClassDeclarationName(tClass); print("class " + className + "{"); print_threadIndentPlus(); L<S> contents = tok_contentsOfClass(tClass); L<S> vars = allVarNames(contents); if (nempty(vars)) print(join(", ", vars)); parse(contents); print_threadIndentMinus(); print("}"); } }
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: | #1009829 |
| Snippet name: | Parse contents of Java classes |
| Eternal ID of this version: | #1009829/7 |
| Text MD5: | 01d0d4b92295f3764d95540dddf6a1c2 |
| Transpilation MD5: | 33dac711781c6bc8cdd56b81b182f3ef |
| Author: | stefan |
| Category: | javax / parsing |
| Type: | JavaX source code (desktop) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2017-08-20 01:54:53 |
| Source code size: | 514 bytes / 22 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 758 / 1646 |
| Version history: | 6 change(s) |
| Referenced in: | [show references] |