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

31
LINES

< > BotCompany Repo | #1003038 // Test structure/unstructure with backrefs / check token count

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

Libraryless. Click here for Pure Java version (4911L/31K/106K).

!7

sclass A {
  A b, c;
  S bla;
  
  *() {}
  *(S *bla) {}
}

p {
  structure_checkTokenCount = true;
  
  A c = new A("bla");
  A a = new A("yo");
  A b = new A("what's up");
  c.b = a;
  a.b = b;
  a.c = new A;
  b.b = a;
  
  S sc, ssc;
  
  print(sc = structure(c));
  print(structure(b));
  print(ssc = structure(unstructure(structure(c))));
  print(structure(unstructure(structure(b))));
  
  assertEquals(sc, ssc);
  print("OK");
}

Author comment

Began life as a copy of #1002708

download  show line numbers  debug dex  old transpilations   

Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, sawdedvomwva, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1003038
Snippet name: Test structure/unstructure with backrefs / check token count
Eternal ID of this version: #1003038/2
Text MD5: 72f0d3a15db5825ba7c0be070318f1e8
Transpilation MD5: 154a5fa244fd4c6b814aa9474fb0e82f
Author: stefan
Category: javax
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-07-04 14:15:55
Source code size: 470 bytes / 31 lines
Pitched / IR pitched: No / No
Views / Downloads: 548 / 670
Version history: 1 change(s)
Referenced in: [show references]