1 | // assumes main class is last declared class |
2 | // returns actual CNC |
3 | static L<S> findMainClass(L<S> tok) {
|
4 | for (L<S> c : reversedList(allClasses(tok))) {
|
5 | S name = getClassDeclarationName(c); |
6 | if (eq(name, "main") || name.startsWith("x"))
|
7 | return c; |
8 | } |
9 | ret findBlock("m {", tok);
|
10 | } |
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: | #1001204 |
| Snippet name: | findMainClass |
| Eternal ID of this version: | #1001204/2 |
| Text MD5: | b87f10bdf5ab3cc206c0dac5bd1355e2 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2022-01-04 20:18:13 |
| Source code size: | 304 bytes / 10 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 996 / 2435 |
| Version history: | 1 change(s) |
| Referenced in: | [show references] |