1 | // including actual input |
2 | static LS gazelle_exactHistoryFromRule(RuleEngine2.Rule rule) {
|
3 | new Matches m; |
4 | new LS history; |
5 | for (GRuleLine l : unnull(rule.insWithType)) |
6 | if (eq(l.type, "standard")) |
7 | listPut(history, 0, l.text); |
8 | else if (startsWith(l.type, "history-", m)) |
9 | listPut(history, parseIntOpt(m.rest())-1, l.text); |
10 | ret reversed(history); |
11 | } |
Began life as a copy of #1022487
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1022498 |
| Snippet name: | gazelle_exactHistoryFromRule (chronological) |
| Eternal ID of this version: | #1022498/3 |
| Text MD5: | aaa622076c73dd53e69155e405845717 |
| Author: | stefan |
| Category: | javax / gazelle |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2019-03-19 11:07:54 |
| Source code size: | 380 bytes / 11 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 430 / 459 |
| Version history: | 2 change(s) |
| Referenced in: | [show references] |