Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

20
LINES

< > BotCompany Repo | #1018237 // Split source into classes & rest [OK]

JavaX source code (desktop) [tags: use-pretranspiled] - run with: x30.jar

Download Jar. Libraryless. Click here for Pure Java version (6291L/45K).

!7

p-exp {
  S src = getServerTranspilationWithoutLibs(#1016478);
  LS tok = javaTok(src);
  LL<S> classes =
    //allClasses(tok);
    innerClassesOfMain(tok);
  print(l(classes));
  L<IntRange> ranges = magicSubListsToIntRanges(tok, classes);
  int iTok = 0;
  for (IntRange r : ranges) {
    print("rest.");
    printIndent(shorten(joinSubList(tok, iTok, r.start)));
    print("Class " + getClassDeclarationName(subList(tok, r)));
    iTok = r.end;
  }
  print("rest.");
  printIndent(shorten(joinSubList(tok, iTok)));
}

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

-
Snippet ID: #1018237
Snippet name: Split source into classes & rest [OK]
Eternal ID of this version: #1018237/10
Text MD5: 708d7a38f047cbd29b18af4fdaf1229d
Transpilation MD5: 078a304ca1e8672d7ba8bfdb42629c3f
Author: stefan
Category: javax / parsing
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-09-11 17:43:20
Source code size: 543 bytes / 20 lines
Pitched / IR pitched: No / No
Views / Downloads: 390 / 960
Version history: 9 change(s)
Referenced in: