1 | sbool ctxFindRules_debug; |
2 | |
3 | static L<CtxRule1> ctxFindRules(S botID) { |
4 | new L<CtxRule1> out; |
5 | File f = loadLibrary(botID); |
6 | L<S> names = endingWithIC(".ctx", listFilesInZip(f)); |
7 | int good = 0, bad = 0; |
8 | for (S name : names) { |
9 | L<S> lines = lines(loadTextFileFromZip(f, name)); |
10 | if (ctxFindRules_debug) |
11 | print(name + ": " + n(lines, "lines")); |
12 | for i, S s over lines: { |
13 | if (javaTokC(s).contains("RULE")) |
14 | out.add(nuWithValues(CtxRule1, file := name, allLines := lines, ruleIndex := i)); |
15 | } |
16 | } |
17 | ret out; |
18 | } |
Began life as a copy of #1008834
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: | #1008838 |
Snippet name: | ctxFindRules |
Eternal ID of this version: | #1008838/12 |
Text MD5: | 86e56d9743d41be8b2c8abecdb2ec82e |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-06-12 18:31:52 |
Source code size: | 556 bytes / 18 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 507 / 545 |
Version history: | 11 change(s) |
Referenced in: | [show references] |