1 | !include once #1022792 // often-used functions |
2 | |
3 | static L<GazelleTree> gazelle_reason_repeat(S input, O... _) { |
4 | new L<GazelleTree> out; |
5 | |
6 | int steps = 0, max = 10; |
7 | while (steps++ < max) { |
8 | addAll(out, (L<GazelleTree>) callF(optPar sendToModules(_), input)); |
9 | |
10 | L<GazelleTree> l = gazelle_reasonWithPreAndPost(input, paramsMinus(_, 'sendToModules)); |
11 | |
12 | // commit to one entry |
13 | |
14 | if (empty(l)) break; |
15 | |
16 | gazelle_sortBeforeCommit(l, _); |
17 | |
18 | GazelleTree t = first(l); |
19 | if (boolPar debug(_) || boolPar debugCommit(_)) |
20 | print("Committing to: " + t.line + " (out of " + l(l) + ")"); |
21 | |
22 | LS lines = tok_splitAtPlusAtBeginningOfLine(t.line); |
23 | if (l(lines) == 2 && t.rule() != null && contains(t.rule().comments, "out 2 = process")) { |
24 | print("splitting!"); |
25 | t.line = first(lines); |
26 | out.add(t); |
27 | input = second(lines); |
28 | continue; |
29 | } |
30 | |
31 | out.add(t); |
32 | break; |
33 | } |
34 | |
35 | ret out; |
36 | } |
Began life as a copy of #1022445
download show line numbers debug dex old transpilations
Travelled to 8 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1022481 |
Snippet name: | gazelle_reason_repeat |
Eternal ID of this version: | #1022481/14 |
Text MD5: | cb8154805dc40b410f98bb151c5c6edc |
Author: | stefan |
Category: | javax / gazelle |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-04-07 16:36:35 |
Source code size: | 987 bytes / 36 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 384 / 428 |
Version history: | 13 change(s) |
Referenced in: | [show references] |